[][src]Module krill::commons::util::httpclient

Some helper functions for HTTP calls

Enums

Error

Functions

client
delete

Sends a delete request to the specified url.

get_json

Performs a GET request that expects a json response that can be deserialized into the an owned value of the expected type. Returns an error if nothing is returned.

get_ok

Checks that there is a 200 OK response at the given URI. Discards the response body.

get_text

Performs a get request and expects a response that can be turned into a string (in particular, not a binary response).

post_binary

Posts binary data, and expects a binary response.

post_empty

Performs a POST with no data to the given URI and expects and empty 200 OK response.

post_json

Performs a POST of data that can be serialized into json, and expects a 200 OK response, without a body.

post_json_with_response

Performs a POST of data that can be serialized into json, and expects a json response that can be deserialized into the an owned value of the expected type.