]> git.tdb.fi Git - libs/net.git/blob - source/http/request.h
Add a dynamic receiver class for more flexible packet handling
[libs/net.git] / source / http / request.h
1 #ifndef MSP_HTTP_REQUEST_H_
2 #define MSP_HTTP_REQUEST_H_
3
4 #include <string>
5 #include <msp/net/mspnet_api.h>
6 #include "message.h"
7
8 namespace Msp {
9 namespace Http {
10
11 class MSPNET_API Request: public Message
12 {
13 private:
14         std::string method;
15         std::string path;
16
17 public:
18         Request(const std::string &, const std::string &);
19         const std::string &get_method() const { return method; }
20         const std::string &get_path() const { return path; }
21         std::string str() const override;
22
23         static Request parse(const std::string &);
24         static Request from_url(const std::string &);
25 };
26
27 } // namespace Http
28 } // namespace Msp
29
30 #endif