-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWebResponse.h
More file actions
43 lines (32 loc) · 751 Bytes
/
WebResponse.h
File metadata and controls
43 lines (32 loc) · 751 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
34
35
36
37
38
39
40
41
42
43
//
// Created by Lynx on 2025-05-13.
//
#ifndef WEBRESPONSE_H
#define WEBRESPONSE_H
#include <map>
#include <string>
#include <iostream>
class WebResponse {
protected:
public:
std::string _error;
std::string raw;
std::string text;
int latencyFullMs;
int latencyResponseMs;
int statusCode;
bool isGood;
std::string statusMessage;
std::string httpVersion;
std::map<std::string, std::string> headers;
WebResponse() = default;
~WebResponse() = default;
friend std::ostream& operator<<(std::ostream& os, const WebResponse& r);
void _processHeaders();
void _processStatus();
void _process();
std::string getError() const {
return _error;
}
};
#endif //WEBRESPONSE_H