Module request

Module request 

Source
Expand description

creating and sending HTTP requests

Structs§

Counter
Every iteration increases count by one. When count is equal to stop, next() returns Some(true) (and sets count to 0), otherwise returns Some(false). Iterator never returns None.
Request
Relatively higher-level struct for making HTTP requests.
RequestBuilder
Relatively low-level struct for making HTTP requests.

Enums§

HttpVersion
HTTP versions
Method
HTTP request methods

Functions§

copy_exact
Copies a given amount of bytes from reader to writer.
copy_until
Reads data from reader and checks for specified value. When data contains specified value or deadline is reached, stops reading. Returns read data as array of two vectors: elements before and after the val.
copy_with_timeout
Copies data from reader to writer until the deadline is reached. Limitations of current implementation may cause exceeding the deadline. Returns how many bytes has been read.
get
Creates and sends GET request. Returns response for this request.
head
Creates and sends HEAD request. Returns response for this request.
post
Creates and sends POST request. Returns response for this request.