-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhttpRequest.h
More file actions
33 lines (25 loc) · 733 Bytes
/
httpRequest.h
File metadata and controls
33 lines (25 loc) · 733 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include <string>
#include <vector>
class HttpRequest {
public:
// Sets the url for the request
void setUrl(std::string url);
// Sets the url for the request
void setHost(std::string host);
// Sets the url for the request
void setPort(std::string port);
// Sets the method of the request (GET only)
void setMethod(std::string method);
// Encodes the information in this request as a vecotr of chars
std::string encode();
// Initializes this request from the data in wire
void consume(std::string wire);
// Returns the value of m_invaludRequest
bool invalidRequest();
private:
std::string m_url;
std::string m_method;
std::string m_host;
std::string m_port;
bool m_invalidRequest;
};