Table of Contents

Class FixContentTypeMiddleware

Namespace
DuetWebServer.Middleware
Assembly
DuetWebServer.dll

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

public class FixContentTypeMiddleware
Inheritance
FixContentTypeMiddleware
Inherited Members

Constructors

FixContentTypeMiddleware(RequestDelegate)

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

public FixContentTypeMiddleware(RequestDelegate next)

Parameters

next RequestDelegate

Next request delegate

Methods

InvokeAsync(HttpContext)

Called when a new HTTP request is received

public Task InvokeAsync(HttpContext context)

Parameters

context HttpContext

HTTP context

Returns

Task

Asynchronous task