put

open override fun put(body: JsonObject)

Sets the HTTP method to PUT and sets a JSON body.

PUT requests are typically used to update or replace an entire resource. The body contains the complete representation of the resource.

Parameters

body

The JSON body for the PUT request.

See also

For POST requests with JSON body.

For DELETE requests with optional JSON body.


open override fun put(contentType: String, body: String)

Sets the HTTP method to PUT with custom content type and body.

PUT requests are typically used to update resources. This method allows specifying a custom Content-Type header along with the body content as a string.

Parameters

contentType

The Content-Type header value (e.g., "text/plain", "application/xml").

body

The request body as a string.

See also

For JSON PUT requests.