HttpSettingsExtensions.

SetJsonRequestBody<T>(HttpSettings, T, bool) Method

Summary

Sets the request body from an object. Serialized as JSON
Assembly
Cake.Http.dll
Namespace
Cake.Http
Containing Type
HttpSettingsExtensions

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.