Treatment post



⬡ http_client: http/client::HttpClient


⇥ form: Block<Vec<byte>>
⇥ mime: Block<string>
⇥ url: Block<string>


↦ data: Stream<byte>
↦ failure: Stream<string>
↦ http_code: Block<u16>
↦ http_status: Block<string>
↦ is_error: Block<bool>
↦ is_success: Block<bool>

Performs HTTP POST operation.

url input gives the URL to call POST on. Request starts as soon as the URL is transmitted. mime input gives request content type. form input gives request content to send to the server.

failure output gives the failures messages related to the network connection or HTTP transgression (and not the errors that are defined by HTTP standard). is_success tells that server responded with positive code (1xx, 2xx and 3xx status ranges). is_error tells that server responded with negative code (4xx and 5xx status ranges). is_success and is_error are mutually exclusive.

data outputs the data body received from the server. http_code contains the response code. http_status contains the canonical reason of the status code.

Also see MDN documentation.