Struct gdhttp::HttpResponse
source · pub struct HttpResponse {
pub status_code: i32,
pub status_code_message: String,
pub headers: HashMap<String, String>,
pub body: String,
}Expand description
Struct representing HTTP Protocol response
Fields§
§status_code: i32HTTP Status Code (ex. 200, 400, 204, 401, 403)
status_code_message: StringHTTP Status Code message (ex. for 200 - “OK”, for 400 - “Bad Request”)
headers: HashMap<String, String>HTTP Headers (ex. Content-Type: application/json)
body: StringBody that will be sent to connected client
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