Struct fp_server::HTTPResponse 
source · pub struct HTTPResponse { /* private fields */ }Implementations§
source§impl HTTPResponse
 
impl HTTPResponse
pub fn new(msg: &str, status_code: u32, body: &[u8]) -> Self
sourcepub fn add_header(&mut self, key: &str, value: &str)
 
pub fn add_header(&mut self, key: &str, value: &str)
Adds a header to the request, if the header already exists, it replaces it
pub fn get_body(&self) -> Vec<u8>
pub fn get_headers(&self) -> Vec<(String, String)>
pub fn get_msg(&self) -> String
pub fn get_code(&self) -> u32
Auto Trait Implementations§
impl RefUnwindSafe for HTTPResponse
impl Send for HTTPResponse
impl Sync for HTTPResponse
impl Unpin for HTTPResponse
impl UnwindSafe for HTTPResponse
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