Skip to content

PUT to rel

WARNING

This API is frozen and deprecated. Please use the fluent API from 0.9.4 on

Follows a resource's link by way of its rel and sends a POST request with data.

Note, you should handle exceptions thrown by the request. See [Optimistic Concurrency] for more details.

Signature

The method signature for PUT to rel is:

python
put_to_rel(resource,
           rel: str,
           data: JSON,
           parameters: dict[str, Any] | None = None,
           template: dict[str, Any] | None = None,
           headers: dict[str, Any] | None = None
           ) -> JSON

JSON: TypeAlias = dict[str, "JSON"] | list["JSON"] | str | int | float | bool | None

parameterdescription
resourceThe body of a response from a previous request, in HAL format
relThe name of the link relation this PUT request will follow.
parameters(optional) name/value pairs which will be used to create a query string.
learn more
template(optional) if the link is templated, name/value pairs to fill the template.
learn more
headers(optional) add to or override the default headers.
learn more
-> returnsthe JSON from the payload of the response to this request

Examples

Released under the MIT License.