Struct monoio_http_client::ClientRequest
source · pub struct ClientRequest { /* private fields */ }
Implementations§
source§impl ClientRequest
impl ClientRequest
pub fn new(client: Client) -> Self
pub fn method<T>(self, method: T) -> Selfwhere Method: TryFrom<T>, <Method as TryFrom<T>>::Error: Into<Error>,
pub fn uri<T>(self, uri: T) -> Selfwhere Uri: TryFrom<T>, <Uri as TryFrom<T>>::Error: Into<Error>,
pub fn header<K, V>(self, key: K, value: V) -> Selfwhere HeaderName: TryFrom<K>, <HeaderName as TryFrom<K>>::Error: Into<Error>, HeaderValue: TryFrom<V>, <HeaderValue as TryFrom<V>>::Error: Into<Error>,
pub async fn send(self) -> Result<ClientResponse>
pub async fn send_body(self, data: Bytes) -> Result<ClientResponse>
pub async fn send_json<T: Serialize>(self, data: &T) -> Result<ClientResponse>
Auto Trait Implementations§
impl !RefUnwindSafe for ClientRequest
impl !Send for ClientRequest
impl !Sync for ClientRequest
impl Unpin for ClientRequest
impl !UnwindSafe for ClientRequest
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