This content is part of a third party extension that is not supported by the Cake project.
For more information about this extension see Cake.Http.
Summary
Sets the request body from an object. Serialized as JSON
- Assembly
- Cake
.Http .dll - Namespace
- Cake
.Http - Containing Type
- Http
Settings Extensions
Syntax
public static HttpSettings SetJsonRequestBody<T>(this HttpSettings settings, T data, bool indentOutput = true)
Remarks
This uses the JavascriptSerializer
Type Parameters
Name | Description |
---|---|
T |
Parameters
Name | Type | Description |
---|---|---|
settings | HttpSettings | The settings. |
data | T | The object to set as the request body. It will be serialized to JSON. |
indentOutput | bool | Option to indent the output of the format |
Return Value
Type | Description |
---|---|
HttpSettings | The same HttpSettings instance so that multiple calls can be chained. |