transformRequestBody

fun transformRequestBody(block: suspend TransformRequestBodyContext.(request: HttpRequestBuilder, content: Any, bodyType: TypeInfo?) -> OutgoingContent?)

Specifies the block transformer for a request body.

This block is invoked for every HttpClient.request call. Here you should serialize body into OutgoingContent or return null if your transformation is not applicable.

Parameters

block

A transformation of request body.

See also