stringBody

fun stringBody(value: String, charset: Charset = Charset.defaultCharset()): HttpRequest.Builder

Sets the body of the HTTP request as a String.

Return

Returns the HttpRequest.Builder instance.

Parameters

value

The value of the request body.

charset

The charset to be used, default is Charset.defaultCharset().