pub trait ConfigExt: Sealed {
fn base_uri_layer(&self) -> BaseUriLayer;
fn auth_layer(&self) -> Result<Option<AuthLayer>, Error>;
fn extra_headers_layer(&self) -> Result<ExtraHeadersLayer, Error>;
}
Available on crate feature
client
only.Expand description
Extensions to Config
for custom Client
.
See Client::new
for an example.
This trait is sealed and cannot be implemented.
Required Methods
fn base_uri_layer(&self) -> BaseUriLayer
fn base_uri_layer(&self) -> BaseUriLayer
Layer to set the base URI of requests to the configured server.
Optional layer to set up Authorization
header depending on the config.
fn extra_headers_layer(&self) -> Result<ExtraHeadersLayer, Error>
fn extra_headers_layer(&self) -> Result<ExtraHeadersLayer, Error>
Layer to add non-authn HTTP headers depending on the config.