pub struct Http {
pub url: String,
pub query: String,
/* private fields */
}
Fields§
§url: String
§query: String
Implementations§
Source§impl Http
impl Http
pub fn new() -> Http
pub fn set_read_timeout(&mut self, secs: u64) -> &mut Self
pub fn set_write_timeout(&mut self, secs: u64) -> &mut Self
pub fn options(&mut self, url: &str) -> &mut Http
pub fn put(&mut self, url: &str) -> &mut Http
pub fn patch(&mut self, url: &str) -> &mut Http
pub fn head(&mut self, url: &str) -> &mut Http
pub fn delete(&mut self, url: &str) -> &mut Http
pub fn header(&mut self, key: &str, value: &str) -> &mut Http
Sourcepub fn bearer_auth(&mut self, token: &str) -> &mut Http
pub fn bearer_auth(&mut self, token: &str) -> &mut Http
bearer 登陆头
Sourcepub fn form_urlencoded(&mut self, data: JsonValue) -> &mut Self
pub fn form_urlencoded(&mut self, data: JsonValue) -> &mut Self
form-urlencoded 数据类型
pub fn raw_javascript(&mut self, data: &str) -> &mut Self
pub fn raw_xml(&mut self, data: &str) -> &mut Self
pub fn raw_html(&mut self, data: &str) -> &mut Self
pub fn raw_text(&mut self, data: &str) -> &mut Self
pub fn raw_stream(&mut self, data: Vec<u8>) -> &mut Self
pub fn raw_binary(&mut self, data: Vec<u8>, content_type: &str) -> &mut Self
Sourcepub fn info(
&mut self,
) -> Result<(u16, String, HashMap<String, String>, HashMap<String, String>), String>
pub fn info( &mut self, ) -> Result<(u16, String, HashMap<String, String>, HashMap<String, String>), String>
返回 info
pub fn stream(&mut self) -> Result<Vec<u8>, String>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Http
impl !RefUnwindSafe for Http
impl Send for Http
impl !Sync for Http
impl Unpin for Http
impl !UnwindSafe for Http
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