You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lokinet/libabyss/include/abyss/http.hpp

38 lines
709 B
C++

#ifndef __ABYSS_HTTP_HPP__
#define __ABYSS_HTTP_HPP__
#include <abyss/json.hpp>
#include <string_view.hpp>
#include <string>
#include <unordered_map>
namespace abyss
{
namespace http
{
struct RequestHeader
{
using Headers_t = std::unordered_multimap< std::string, std::string >;
Headers_t Headers;
std::string Method;
std::string Path;
};
struct HeaderReader
{
RequestHeader Header;
virtual ~HeaderReader()
{
}
bool
ProcessHeaderLine(abyss::string_view line, bool& done);
virtual bool
ShouldProcessHeader(const abyss::string_view& line) const = 0;
};
} // namespace http
} // namespace abyss
#endif