Orbit Framework
An ultra-modern, asynchronous, cross-platform C++ Web Framework.
Loading...
Searching...
No Matches
HttpParser.hpp
Go to the documentation of this file.
1#pragma once
3#include <optional>
4#include <string_view>
5
6namespace http {
7
20bool connection_option_present(std::string_view field_value, std::string_view option);
21
26public:
32 static std::optional<HttpRequest> parse(std::string_view raw_request);
33
39 static HttpMethod parse_method(std::string_view method_str);
40};
41
42} // namespace http
Utility class for parsing HTTP requests and related components.
Definition HttpParser.hpp:25
static std::optional< HttpRequest > parse(std::string_view raw_request)
Parses a raw HTTP request string into a structured HttpRequest object.
Definition HttpParser.cpp:51
static HttpMethod parse_method(std::string_view method_str)
Parses an HTTP method string into an HttpMethod enum value.
Definition HttpParser.cpp:40
Definition Http2Session.hpp:21
bool connection_option_present(std::string_view field_value, std::string_view option)
Tests whether a Connection header field carries a given option.
Definition HttpParser.cpp:8
HttpMethod
Represents standard HTTP methods.
Definition HttpRequest.hpp:17