#include <Request.hpp>
◆ Request() [1/2]
| http::Request::Request |
( |
| ) |
|
◆ ~Request()
| http::Request::~Request |
( |
| ) |
|
◆ Request() [2/2]
| http::Request::Request |
( |
const Request & | | ) |
|
|
private |
◆ body() [1/3]
◆ body() [2/3]
◆ body() [3/3]
◆ bodyPath()
| const std::string & http::Request::bodyPath |
( |
| ) |
const |
◆ clear()
| void http::Request::clear |
( |
| ) |
|
Resets the request to a default state, ready for reuse. Cleans up any existing body and resets all fields.
◆ getMaxAllowedContentSize()
| size_t http::Request::getMaxAllowedContentSize |
( |
| ) |
const |
◆ headers() [1/2]
| Headers & http::Request::headers |
( |
| ) |
|
Gets a mutable reference to the request headers.
- Note
- This is public to allow handlers to inspect headers.
◆ headers() [2/2]
| Headers const & http::Request::headers |
( |
| ) |
const |
Gets a constant reference to the request headers.
◆ location() [1/2]
Gets a const pointer to the matched LocationBlock.
- Returns
- Const pointer to the block, or NULL if not matched.
◆ location() [2/2]
◆ method() [1/2]
Gets the HTTP method enum.
◆ method() [2/2]
◆ moveBody()
Relocates the request body to a permanent location.
This transfers ownership of the file; it will NO LONGER be managed or deleted by the Request object upon destruction.
- Parameters
-
| destPath | Absolute path to the destination file. |
- Returns
- MoveStatus indicating success or the specific type of failure.
◆ operator=()
◆ path() [1/2]
| std::string const & http::Request::path |
( |
| ) |
const |
Gets the path portion of the URI (e.g., "/path").
◆ path() [2/2]
| Request & http::Request::path |
( |
std::string const & | path | ) |
|
|
protected |
◆ queryString()
| std::string const & http::Request::queryString |
( |
| ) |
const |
Gets the query string portion of the URI (e.g., "query=1").
◆ remoteAddr() [1/2]
| std::string const & http::Request::remoteAddr |
( |
| ) |
const |
Gets the remote (client) IP address for this request.
- Returns
- The client IP address as a string (e.g., "192.168.1.100").
◆ remoteAddr() [2/2]
| Request & http::Request::remoteAddr |
( |
std::string const & | addr | ) |
|
|
protected |
◆ resolvePath()
| std::string http::Request::resolvePath |
( |
| ) |
const |
Resolves the full filesystem path for a request.
This function correctly implements the logic for both the Nginx 'root' and 'alias' directives. 'alias' takes precedence if it exists.
- Returns
- The fully resolved filesystem path.
◆ server() [1/2]
Gets a const pointer to the matched ServerBlock.
- Returns
- Const pointer to the block, or NULL if not matched.
◆ server() [2/2]
◆ status() [1/2]
Gets the current status code.
◆ status() [2/2]
Sets the response status and automatically syncs the reason phrase.
- Parameters
-
| statusCode | The HttpStatus enum value (e.g., NOT_FOUND). |
- Returns
- A reference to this object for chaining.
◆ uri() [1/2]
| std::string const & http::Request::uri |
( |
| ) |
const |
Gets the full, original request URI (e.g., "/path?query=1").
◆ uri() [2/2]
| Request & http::Request::uri |
( |
std::string const & | uri | ) |
|
◆ version() [1/2]
| std::string const & http::Request::version |
( |
| ) |
const |
Gets the HTTP protocol version (e.g., "HTTP/1.1").
◆ version() [2/2]
| Request & http::Request::version |
( |
std::string const & | version | ) |
|
|
protected |
◆ wantsJson()
| bool http::Request::wantsJson |
( |
| ) |
const |
Checks the 'Accept' header to see if the client prefers JSON.
- Returns
- True if 'application/json' is found in the Accept header.
◆ network::ClientHandler
◆ RequestParser
◆ Router
◆ body_
◆ headers_
◆ location_
◆ remoteAddr_
| std::string http::Request::remoteAddr_ |
|
private |
◆ requestLine_
◆ server_
◆ status_
The documentation for this class was generated from the following files: