Struct spot::response::Response [−][src]
Fields
status: u16
Status code for the response
body: Vec<u8>
The response body. If there is no body this is empty
headers: HashMap<String, String>
Contains all the desired response headers. No headers are added automatically except for content-length and content-type when adding a body
Implementations
Creates a new http response object
Adds a new header to the response
Adds a body from a String to the request, overwrites previous body, then adds content length and content type “text/plain”.
Adds a body from a byte array, then sets the content-length header to be equal to the size of the array