Start working on build system.
This commit is contained in:
parent
4b308f6c32
commit
521486be62
88 changed files with 1065 additions and 349 deletions
43
src/base/core/protocol/HttpRequest.h
Normal file
43
src/base/core/protocol/HttpRequest.h
Normal file
|
@ -0,0 +1,43 @@
|
|||
#pragma once
|
||||
|
||||
#include "HttpHeader.h"
|
||||
#include "HttpPreamble.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
class HttpRequest
|
||||
{
|
||||
public:
|
||||
|
||||
enum class Verb
|
||||
{
|
||||
GET,
|
||||
PUT,
|
||||
POST,
|
||||
PATCH,
|
||||
_DELETE,
|
||||
UNKNOWN
|
||||
};
|
||||
|
||||
HttpRequest() = default;
|
||||
|
||||
HttpRequest(Verb verb, const std::string& path = {});
|
||||
|
||||
Verb getVerb() const;
|
||||
|
||||
std::string getPath() const;
|
||||
|
||||
void fromString(const std::string& string);
|
||||
|
||||
std::string toString(const std::string& host) const;
|
||||
|
||||
std::size_t requiredBytes() const;
|
||||
|
||||
private:
|
||||
Verb mVerb = Verb::UNKNOWN;
|
||||
|
||||
HttpHeader mHeader;
|
||||
HttpPreamble mPreamble;
|
||||
|
||||
unsigned mRequiredBytes{ 0 };
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue