Structure Request provides configuration, connection pooling, cookie
persistance. You can consider it as 'Session' and reuse it - all caches and settings will effective
for next requests.
Some most usefull settings:
name
type
meaning
default
keepAlive
bool
use keepalive connection
true
verbosity
uint
verbosity level (0, 1, 2 or 3)
16KB
maxRedirects
uint
maximum redirects allowed (0 to disable redirects)
true
maxHeadersLength
size_t
max. acceptable response headers length
32KB
maxContentLength
size_t
max. acceptable content length
0 - unlimited
bufferSize
size_t
socket io buffer size
16KB
timeout
Duration
timeout on connect or data transfer
30.seconds
proxy
string
url of the HTTP/HTTPS/FTP proxy
null
bind
string
use local address for outgoing connections
null
useStreaming
bool
receive response data as InputRange in case it can't fit memory
Add module-level interceptor. Each Request will include it in the processing.
it is handy as you can change behaviour of your requests without any changes
in your code, just install interceptor before any call to Request().
'Intercepror' intercepts Request. It can modify request, or log it, or cache it
or do whatever you need. When done it can return response or
pass it to next request handler.