diff options
Diffstat (limited to 'http.h')
-rw-r--r-- | http.h | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -0,0 +1,27 @@ +#ifndef HTTP_H +#define HTTP_H + +#include <iostream> +#include <string> +#include <map> + +typedef std::map<std::string, std::string> HTTPHeaders; + +class HTTPRequest { + public: + std::string type, path, httpver; + HTTPHeaders headers; + HTTPRequest(std::istream& is); +}; + +class HTTPResponse { + public: + HTTPHeaders headers; + int code; + std::string httpver, status; + HTTPResponse(); + void add_header(std::string key, std::string value); + void write_headers(std::ostream& os); +}; + +#endif |