pub struct Curl { /* private fields */ }
Available on crate features
blocking-client
and http-client
and http-client-curl
only.Expand description
A utility to abstract interactions with curl handles.
Trait Implementations§
source§impl Http for Curl
impl Http for Curl
§type ResponseBody = Reader
type ResponseBody = Reader
A type providing the response.
source§fn get(
&mut self,
url: &str,
base_url: &str,
headers: impl IntoIterator<Item = impl AsRef<str>>
) -> Result<GetResponse<Self::Headers, Self::ResponseBody>, Error>
fn get( &mut self, url: &str, base_url: &str, headers: impl IntoIterator<Item = impl AsRef<str>> ) -> Result<GetResponse<Self::Headers, Self::ResponseBody>, Error>
Initiate a
GET
request to url
provided the given headers
, where base_url
is so that base_url + tail == url
. Read moresource§fn post(
&mut self,
url: &str,
base_url: &str,
headers: impl IntoIterator<Item = impl AsRef<str>>,
body: PostBodyDataKind
) -> Result<PostResponse<Self::Headers, Self::ResponseBody, Self::PostBody>, Error>
fn post( &mut self, url: &str, base_url: &str, headers: impl IntoIterator<Item = impl AsRef<str>>, body: PostBodyDataKind ) -> Result<PostResponse<Self::Headers, Self::ResponseBody, Self::PostBody>, Error>
Initiate a
POST
request to url
providing with the given headers
, where base_url
is so that base_url + tail == url
. Read moreAuto Trait Implementations§
impl Freeze for Curl
impl !RefUnwindSafe for Curl
impl Send for Curl
impl !Sync for Curl
impl Unpin for Curl
impl !UnwindSafe for Curl
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