Struct longbridge_httpcli::HttpClientConfig
source · pub struct HttpClientConfig { /* private fields */ }Expand description
Configuration options for Http client
Implementations§
source§impl HttpClientConfig
impl HttpClientConfig
sourcepub fn new(
app_key: impl Into<String>,
app_secret: impl Into<String>,
access_token: impl Into<String>
) -> Self
pub fn new( app_key: impl Into<String>, app_secret: impl Into<String>, access_token: impl Into<String> ) -> Self
Create a new HttpClientConfig
sourcepub fn from_env() -> Result<Self, HttpClientError>
pub fn from_env() -> Result<Self, HttpClientError>
Create a new HttpClientConfig from the given environment variables
Variables
- LONGBRIDGE_APP_KEY
- LONGBRIDGE_APP_SECRET
- LONGBRIDGE_ACCESS_TOKEN
- LONGBRIDGE_HTTP_URL
sourcepub fn http_url(self, url: impl Into<String>) -> Self
pub fn http_url(self, url: impl Into<String>) -> Self
Specifies the url of the OpenAPI server.
Default: https://openapi.longbridgeapp.com NOTE: Usually you don’t need to change it.
Trait Implementations§
source§impl Clone for HttpClientConfig
impl Clone for HttpClientConfig
source§fn clone(&self) -> HttpClientConfig
fn clone(&self) -> HttpClientConfig
Returns a copy 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 more