pub struct ApiClientOptions {
pub base_url: String,
pub credentials: ApiCredentials,
pub cookie: Option<String>,
pub timeout: Duration,
pub headers: Vec<(String, String)>,
pub allow_insecure_http: bool,
}Fields§
§base_url: StringThe issuer origin, for example https://auth.example.com. A path prefix is allowed.
credentials: ApiCredentialsThe value of a Cookie header, sent only to operations that authenticate with the console or hosted-page
cookie, never to a public endpoint.
timeout: DurationPer-request timeout; zero disables it. Default 30 seconds.
headers: Vec<(String, String)>Headers added to every request (never Authorization, Content-Type, Cookie, Host).
allow_insecure_http: boolAllow http:// to a non-loopback host. Credentials then cross the network in clear text. Default false.
Implementations§
Source§impl ApiClientOptions
impl ApiClientOptions
pub fn new(base_url: impl Into<String>) -> Self
pub fn with_credentials(self, credentials: ApiCredentials) -> Self
Trait Implementations§
Source§impl Clone for ApiClientOptions
impl Clone for ApiClientOptions
Source§fn clone(&self) -> ApiClientOptions
fn clone(&self) -> ApiClientOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ApiClientOptions
impl !RefUnwindSafe for ApiClientOptions
impl Send for ApiClientOptions
impl Sync for ApiClientOptions
impl Unpin for ApiClientOptions
impl UnsafeUnpin for ApiClientOptions
impl !UnwindSafe for ApiClientOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more