[−][src]Trait yukikaze::client::config::Config
Generic config trait.
Each method describes single aspect of configuration and provided with sane defaults
Associated Types
type Connector: Service<Uri> + Default + Clone + Send + Sync
Connector type.
type Timer: Oneshot
Timer type.
Provided methods
fn decompress() -> bool
Specifies whether to automatically request compressed response.
Defaults to true.
fn timeout() -> Duration
Specifies request timeout.
Default is 30 seconds
Zero duration means infinite
fn default_user_agent(request: &mut Request)
Specifies how to set user agent
By default it set's Yukikaze/<lib version>, if agent is not present
fn default_headers(request: &mut Request)
Allows to sets default headers before request is sent out
It is called as soon as request is being sent out,
but before Accept-Encoding is set.
By default it sets following, if not present:
- Set default user agent;
HOSTheader with host, and optionally port, taken from URI;
fn max_redirect_num() -> usize
Returns max number of redirects
By default it is 8.
fn config_hyper(builder: &mut Builder) -> &mut Builder
Allows to hook hyper's Client configuration.
By default it uses hyper's defaults