Class SendHttpResponse
Send a response to a received HTTP request
Inherited Members
Namespace: DuetAPI.Commands
Assembly: DuetAPI.dll
Syntax
public sealed class SendHttpResponse
Properties
Response
Content to return. If this is null or empty and a WebSocket is connected, the connection is closed
Declaration
public string Response { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
ResponseType
Type of the content to return. Ignored if a WebSocket is connected
Declaration
public HttpResponseType ResponseType { get; set; }
Property Value
| Type | Description |
|---|---|
| HttpResponseType |
StatusCode
HTTP or WebSocket status code to return. If this is greater than or equal to 1000, the WebSocket is closed
Declaration
public int StatusCode { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Remarks
Codes greater than 1000 represent WebSocket status codes (1000 = normal close)