Class SendHttpResponse
Send a response to a received HTTP request
Inheritance
System.Object
SendHttpResponse
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
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 |
---|---|
System.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 |
---|---|
System.Int32 |
Remarks
Codes greater than 1000 represent WebSocket status codes (1000 = normal close)