Struct mio_httpc::CallBuilder
[−]
[src]
pub struct CallBuilder {}
Used to start a call and get a Call for it.
Methods
impl CallBuilder
[src]
fn new(req: Request<Vec<u8>>) -> CallBuilder
[src]
If req contains body it will be used.
If req contains no body, but has content-length set, it will wait for send body to be provided through Httpc::call_send. mio_httpc will set headers (if they are not already): user-agent, connection, host, auth, content-length If you're only executing a one-off call you should set connection: close as default is keep-alive.
fn call(self, httpc: &mut Httpc, poll: &Poll) -> Result<Call>
[src]
Consume and execute HTTP call
fn websocket(self, httpc: &mut Httpc, poll: &Poll) -> Result<WebSocket>
[src]
Consume and start a WebSocket
fn add_root_ca_der(self, v: Vec<u8>) -> Self
[src]
Add custom root ca in DER format
fn max_response(self, m: usize) -> Self
[src]
Default 10MB.
This will limit how big the internal Vec
For WebSockets this will also be a received fragment size limit!
fn dns_retry_ms(self, n: u64) -> Self
[src]
Default: 100ms
Starting point of dns packet resends if nothing received. Every next resend timeout is 2x the previous one but stops at 1s. So for 100ms: 100ms, 200ms, 400ms, 800ms, 1000ms, 1000ms...
fn chunked_parse(self, b: bool) -> Self
[src]
Default true.
Configurable because it entails copying the data stream.
fn chunked_max_chunk(self, v: usize) -> Self
[src]
Default 32K
Max size of chunk in a chunked transfer.
fn timeout_ms(self, d: u64) -> Self
[src]
Default 60s
Maximum amount of time a call should last.