put
Call PUT on a target resource with B as the body type and R as the expected return type.
See also tryPut, which will return null if the request fails for any reason.
Parameters
The body to send with the request. Make sure your class is marked with @Serializable or provide a custom bodySerializer. Note that JSON is used as the serialization format, and if body is non-null, the Content-type
will automatically be set to application/json
(unless explicitly set by the user).
A serialize-friendly version of put that doesn't put any type constraints on the body.
This is useful if your request doesn't require a body to be included, so there shouldn't be a need to specify a body type constraint in that case, or if it is easier to use a custom, handcrafted byte array message instead.