21 lines
478 B
C++
21 lines
478 B
C++
#pragma once
|
|
|
|
#include "http_common.hpp"
|
|
#include "cookie.hpp"
|
|
#include <unordered_map>
|
|
#include <vector>
|
|
|
|
struct HttpRequest {
|
|
HttpMethod method = HttpMethod::UNKNOWN;
|
|
string_view path;
|
|
string_view query;
|
|
string_view version;
|
|
string_view body;
|
|
std::unordered_map<string_view, string_view> headers;
|
|
std::unordered_map<std::string, std::string> params; // URL parameters
|
|
std::vector<Cookie> cookies; // Parsed cookies
|
|
size_t content_length = 0;
|
|
|
|
bool valid = false;
|
|
};
|