Type extension
HttpContextJsonExtensions
extension HttpContextJsonExtensions for HttpContext
Module: System.Web.Http.Json
Assembly: System.Web.dll
JSON response configuration for an accepted server exchange.
Receiver
Methods
2 items
Extension member:
RespondJson(statusCode: HttpStatusCode, value: object) -> Result<void, JsonError>
Configures the status and application/json; charset=utf-8 content atomically. Does not send or close the exchange; Complete still validates status/body rules.
Extension from HttpContextJsonExtensions.RespondJson
Extension member:
RespondJson(value: object) -> Result<void, JsonError>
Serializes a supported model or DOM and configures status 200 with JSON content. Serialization failure leaves Response unchanged. Call Complete to send.
Extension from HttpContextJsonExtensions.RespondJson