pub struct HttpBody { /* private fields */ }
Implementations§
Source§impl HttpBody
impl HttpBody
pub fn new(params: &HashMap<String, String>, raw: &[u8]) -> Self
Sourcepub fn from_string(data: &str) -> Self
pub fn from_string(data: &str) -> Self
Generate body from str
pub fn from_raw(data: &[u8]) -> Self
pub fn from_raw_str(data: &str) -> Self
pub fn upload_file( &mut self, param_name: &str, file_path: &str, ) -> Result<(), Error>
Sourcepub fn is_form_post(&self) -> bool
pub fn is_form_post(&self) -> bool
Get is_form_post
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HttpBody
impl RefUnwindSafe for HttpBody
impl Send for HttpBody
impl Sync for HttpBody
impl Unpin for HttpBody
impl UnwindSafe for HttpBody
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