pub struct Http1Client { /* private fields */ }Expand description
HTTP/1.1 client implementation
Implementations§
Source§impl Http1Client
impl Http1Client
Sourcepub fn new(config: BaseConfig) -> Result<Self, ApiError>
pub fn new(config: BaseConfig) -> Result<Self, ApiError>
Create a new HTTP/1.1 client with the given configuration
Sourcepub async fn send_request<T, R>(
&self,
endpoint: &str,
request_body: &T,
) -> Result<R, ApiError>where
T: Serialize,
R: for<'de> Deserialize<'de>,
pub async fn send_request<T, R>(
&self,
endpoint: &str,
request_body: &T,
) -> Result<R, ApiError>where
T: Serialize,
R: for<'de> Deserialize<'de>,
Send a request to the remote Hessra authorization service
pub async fn send_request_with_auth<T, R>(
&self,
endpoint: &str,
request_body: &T,
auth_header: &str,
) -> Result<R, ApiError>where
T: Serialize,
R: for<'de> Deserialize<'de>,
Auto Trait Implementations§
impl Freeze for Http1Client
impl !RefUnwindSafe for Http1Client
impl Send for Http1Client
impl Sync for Http1Client
impl Unpin for Http1Client
impl !UnwindSafe for Http1Client
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