pub struct StreamableHttpClientConfig {
pub base_url: String,
pub session_id: Option<String>,
pub protocol_version: String,
pub timeout: Duration,
pub max_retries: u32,
pub auth_token: Option<String>,
pub oauth_config: Option<OAuthConfig>,
pub auth_method: Option<AuthMethod>,
}Expand description
Streamable HTTP client configuration
Fields§
§base_url: String§session_id: Option<String>§protocol_version: String§timeout: Duration§max_retries: u32§auth_token: Option<String>§oauth_config: Option<OAuthConfig>§auth_method: Option<AuthMethod>Implementations§
Source§impl StreamableHttpClientConfig
impl StreamableHttpClientConfig
Sourcepub fn with_bearer_auth(self, token: String) -> StreamableHttpClientConfig
pub fn with_bearer_auth(self, token: String) -> StreamableHttpClientConfig
Set Bearer token authentication
Sourcepub fn with_oauth_auth(self, config: OAuthConfig) -> StreamableHttpClientConfig
pub fn with_oauth_auth(self, config: OAuthConfig) -> StreamableHttpClientConfig
Set OAuth authentication
Sourcepub fn with_api_key_auth(self, api_key: String) -> StreamableHttpClientConfig
pub fn with_api_key_auth(self, api_key: String) -> StreamableHttpClientConfig
Set API key authentication
Sourcepub fn with_api_key_auth_custom(
self,
api_key: String,
header_name: String,
) -> StreamableHttpClientConfig
pub fn with_api_key_auth_custom( self, api_key: String, header_name: String, ) -> StreamableHttpClientConfig
Set API key authentication with custom header name
Sourcepub fn with_basic_auth(
self,
username: String,
password: String,
) -> StreamableHttpClientConfig
pub fn with_basic_auth( self, username: String, password: String, ) -> StreamableHttpClientConfig
Set Basic authentication
Sourcepub fn with_custom_auth(self) -> StreamableHttpClientConfig
pub fn with_custom_auth(self) -> StreamableHttpClientConfig
Set custom header authentication
Sourcepub fn with_auth_method(
self,
auth_method: AuthMethod,
) -> StreamableHttpClientConfig
pub fn with_auth_method( self, auth_method: AuthMethod, ) -> StreamableHttpClientConfig
Set authentication method
Trait Implementations§
Source§impl Clone for StreamableHttpClientConfig
impl Clone for StreamableHttpClientConfig
Source§fn clone(&self) -> StreamableHttpClientConfig
fn clone(&self) -> StreamableHttpClientConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StreamableHttpClientConfig
impl Debug for StreamableHttpClientConfig
Source§impl Default for StreamableHttpClientConfig
impl Default for StreamableHttpClientConfig
Source§fn default() -> StreamableHttpClientConfig
fn default() -> StreamableHttpClientConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for StreamableHttpClientConfig
impl !RefUnwindSafe for StreamableHttpClientConfig
impl Send for StreamableHttpClientConfig
impl Sync for StreamableHttpClientConfig
impl Unpin for StreamableHttpClientConfig
impl !UnwindSafe for StreamableHttpClientConfig
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