|
Orbit Framework 2.0.0
A high-performance asynchronous C++20 HTTP server framework.
|
Utility class for parsing HTTP requests and related components. More...
#include <HttpParser.hpp>
Static Public Member Functions | |
| static std::optional< HttpRequest > | parse (std::string_view raw_request) |
| Parses one complete HTTP/1.1 request held in memory. | |
| static HttpMethod | parse_method (std::string_view method_str) |
| Parses an HTTP method string into an HttpMethod enum value. | |
Utility class for parsing HTTP requests and related components.
|
static |
Parses one complete HTTP/1.1 request held in memory.
Uses Http1Parser (llhttp), with the same strict rules and default limits as a connection. The request owns its headers and body, so it outlives raw_request. Anything after the first request is ignored.
| raw_request | The raw request, including any body. |
|
static |
Parses an HTTP method string into an HttpMethod enum value.
| method_str | The string representation of the HTTP method (e.g., "GET"). |