Class AddHttpEndpoint
Register a new HTTP endpoint via DuetWebServer. This will create a new HTTP endpoint under /machine/{Namespace}/{EndpointPath}. Returns a path to the UNIX socket which DuetWebServer will connect to whenever a matching HTTP request is received. A plugin using this command has to open a new UNIX socket with the given path that DuetWebServer can connect to
[RequiredPermissions(SbcPermissions.RegisterHttpEndpoints)]
public class AddHttpEndpoint : Command<string>
- Inheritance
-
AddHttpEndpoint
- Derived
- Inherited Members
Constructors
AddHttpEndpoint()
public AddHttpEndpoint()
Properties
EndpointType
Type of the HTTP request
public HttpEndpointType EndpointType { get; set; }
Property Value
IsUploadRequest
Whether this is an upload request
public bool IsUploadRequest { get; set; }
Property Value
- See Also
Namespace
Namespace of the plugin wanting to create a new third-party endpoint
public string Namespace { get; set; }
Property Value
Path
Path to the endpoint to register
public string Path { get; set; }
Property Value
Methods
UpdateFromJson(JsonElement)
Update this instance from a given JSON element
public override void UpdateFromJson(JsonElement jsonElement)
Parameters
jsonElementJsonElementElement to update this intance from
Remarks
This method is auto-generated
Exceptions
- JsonException
Failed to deserialize data
UpdateFromJsonReader(ref Utf8JsonReader)
Update this instance from a given JSON element
public override void UpdateFromJsonReader(ref Utf8JsonReader reader)
Parameters
readerUtf8JsonReaderReader to update this intance from
Remarks
This method is auto-generated
Exceptions
- JsonException
Failed to deserialize data