Table of Contents

Class SendHttpResponse

Namespace
DuetAPI.Commands
Assembly
DuetAPI.dll

Send a response to a received HTTP request

public sealed class SendHttpResponse
Inheritance
SendHttpResponse
Inherited Members

Constructors

SendHttpResponse()

public SendHttpResponse()

Properties

Response

Content to return. If this is null or empty and a WebSocket is connected, the connection is closed

public string Response { get; set; }

Property Value

string

ResponseType

Type of the content to return. Ignored if a WebSocket is connected

public HttpResponseType ResponseType { get; set; }

Property Value

HttpResponseType

StatusCode

HTTP or WebSocket status code to return. If this is greater than or equal to 1000, the WebSocket is closed

public int StatusCode { get; set; }

Property Value

int

Remarks

Codes greater than 1000 represent WebSocket status codes (1000 = normal close)