Class FixContentTypeMiddleware
Middleware to fix incoming content types for code and upload request (PUT /machine/file/..., POST /machine/code, POST /rr_upload). Without this middleware, incorrect request content types cause the validation to fail and there are no discrete MVC attributes to fix this
Inherited Members
Namespace: DuetWebServer.Middleware
Assembly: DuetWebServer.dll
Syntax
public class FixContentTypeMiddleware
Constructors
FixContentTypeMiddleware(RequestDelegate)
Constructor of this middleware
Declaration
public FixContentTypeMiddleware(RequestDelegate next)
Parameters
Type | Name | Description |
---|---|---|
RequestDelegate | next | Next request delegate |
Methods
InvokeAsync(HttpContext)
Called when a new HTTP request is received
Declaration
public Task InvokeAsync(HttpContext context)
Parameters
Type | Name | Description |
---|---|---|
HttpContext | context | HTTP context |
Returns
Type | Description |
---|---|
Task | Asynchronous task |