Encodes the response into a string. The Content-Length header field is created automatically based on the length of the content field.
auto response = new Response(200, [], "Hi"); assert(response.toString() == "HTTP/1.1 200 OK\r\nContent-Length: 2\r\n\r\nHi");
See Implementation
Encodes the response into a string. The Content-Length header field is created automatically based on the length of the content field.