Class RequestDeserializer
Provides standard request deserialization callbacks.
Inherited Members
Namespace: EmbedIO
Syntax
public static class RequestDeserializer
Methods
Default<TData>(IHttpContext)
The default request deserializer used by EmbedIO.
Equivalent to Json<TData>(IHttpContext).
Declaration
public static Task<TData> Default<TData>(IHttpContext context)
Parameters
Type | Name | Description |
---|---|---|
IHttpContext | context | The IHttpContext whose request body is to be deserialized. |
Returns
Type | Description |
---|---|
Task<TData> | A |
Type Parameters
Name | Description |
---|---|
TData | The expected type of the deserialized data. |
Json<TData>(IHttpContext)
Asynchronously deserializes a request body in JSON format.
Declaration
public static Task<TData> Json<TData>(IHttpContext context)
Parameters
Type | Name | Description |
---|---|---|
IHttpContext | context | The IHttpContext whose request body is to be deserialized. |
Returns
Type | Description |
---|---|
Task<TData> | A |
Type Parameters
Name | Description |
---|---|
TData | The expected type of the deserialized data. |
Json<TData>(JsonSerializerCase)
Returns a RequestDeserializerCallback<TData> that will deserialize an HTTP request body in JSON format, using the specified property name casing.
Declaration
public static RequestDeserializerCallback<TData> Json<TData>(JsonSerializerCase jsonSerializerCase)
Parameters
Type | Name | Description |
---|---|---|
JsonSerializerCase | jsonSerializerCase | The |
Returns
Type | Description |
---|---|
RequestDeserializerCallback<TData> | A RequestDeserializerCallback<TData> that can be used to deserialize a JSON request body. |
Type Parameters
Name | Description |
---|---|
TData | The expected type of the deserialized data. |