pub struct Client { /* private fields */ }Implementations§
Source§impl Client
impl Client
pub fn new() -> Self
pub fn debug(&mut self) -> &mut Self
pub fn ca_pem(&mut self, ca_pem: &str) -> &mut Self
pub fn pkcs12(&mut self, pkcs12: &str, password: &str) -> &mut Self
pub fn http10(&mut self) -> &mut Self
pub fn http11(&mut self) -> &mut Self
pub fn http2(&mut self) -> &mut Self
pub fn auto_location(&mut self) -> &mut Self
pub fn get(&mut self, url: &str) -> &mut Self
pub fn post(&mut self, url: &str) -> &mut Self
pub fn head(&mut self, url: &str) -> &mut Self
pub fn delete(&mut self, url: &str) -> &mut Self
pub fn method(&mut self, method: &str, url: &str) -> &mut Self
pub fn header(&mut self, key: &str, value: JsonValue) -> &mut Self
pub fn query(&mut self, key: &str, value: JsonValue) -> &mut Self
Sourcepub fn x_www_form_urlencoded(&mut self, data: JsonValue) -> &mut Self
pub fn x_www_form_urlencoded(&mut self, data: JsonValue) -> &mut Self
表单urlencoded请求
pub fn send(&mut self) -> Result<ClientResponse, String>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnwindSafe for Client
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