Struct twilight_http::client::ClientBuilder [−][src]
pub struct ClientBuilder { /* fields omitted */ }
Expand description
A builder for Client
.
Implementations
Set the ApplicationId
used by interaction methods.
Set the default allowed mentions setting to use on all messages sent through the HTTP client.
Set the proxy to use for all HTTP(S) requests.
Note that this isn’t currently a traditional proxy, but is for working with something like twilight’s HTTP proxy server.
Examples
Set the proxy to twilight_http_proxy.internal
:
use twilight_http::Client; let client = Client::builder() .proxy("twilight_http_proxy.internal", true) .build();
Set a ratelimiter to use.
If the argument is None
then the client’s ratelimiter will be skipped
before making a request.
If this method is not called at all then a default ratelimiter will be
created by ClientBuilder::build
.
Set the timeout for HTTP requests.
The default is 10 seconds.
Set a group headers which are sent in every request.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for ClientBuilder
impl Send for ClientBuilder
impl Sync for ClientBuilder
impl Unpin for ClientBuilder
impl !UnwindSafe for ClientBuilder