]> git.tdb.fi Git - libs/net.git/blob - source/request.h
Pass an exception to signal_socket_error instead of error code
[libs/net.git] / source / request.h
1 #ifndef MSP_HTTP_REQUEST_H_
2 #define MSP_HTTP_REQUEST_H_
3
4 #include <string>
5 #include "message.h"
6
7 namespace Msp {
8 namespace Http {
9
10 class Request: public Message
11 {
12 private:
13         std::string method;
14         std::string path;
15
16 public:
17         Request(const std::string &, const std::string &);
18         const std::string &get_method() const { return method; }
19         const std::string &get_path() const { return path; }
20         virtual std::string str() const;
21
22         static Request parse(const std::string &);
23         static Request from_url(const std::string &);
24 };
25
26 } // namespace Http
27 } // namespace Msp
28
29 #endif