|
Network System 0.1.1
High-performance modular networking library for scalable client-server applications
|
Represents an HTTP request message. More...
#include <http_types.h>

Public Member Functions | |
| auto | get_header (const std::string &name) const -> std::optional< std::string > |
| Get the value of a header (case-insensitive) | |
| auto | set_header (const std::string &name, const std::string &value) -> void |
| Set a header value. | |
| auto | get_body_string () const -> std::string |
| Get body as string. | |
| auto | set_body_string (const std::string &content) -> void |
| Set body from string. | |
Public Attributes | |
| http_method | method = http_method::HTTP_GET |
| std::string | uri |
| http_version | version = http_version::HTTP_1_1 |
| std::map< std::string, std::string > | headers |
| std::vector< uint8_t > | body |
| std::map< std::string, std::string > | query_params |
| std::map< std::string, std::string > | cookies |
| std::map< std::string, std::string > | form_data |
| std::map< std::string, multipart_file > | files |
Represents an HTTP request message.
Definition at line 111 of file http_types.h.
| auto kcenon::network::internal::http_request::get_body_string | ( | ) | const -> std::string |
Get body as string.
Definition at line 57 of file http_types.cpp.
References body.
| auto kcenon::network::internal::http_request::get_header | ( | const std::string & | name | ) | const -> std::optional<std::string> |
Get the value of a header (case-insensitive)
| name | Header name |
Definition at line 24 of file http_types.cpp.
Referenced by kcenon::network::core::http_client::build_request().

| auto kcenon::network::internal::http_request::set_body_string | ( | const std::string & | content | ) | -> void |
Set body from string.
| content | Body content as UTF-8 string |
Definition at line 62 of file http_types.cpp.
| auto kcenon::network::internal::http_request::set_header | ( | const std::string & | name, |
| const std::string & | value ) -> void |
Set a header value.
| name | Header name |
| value | Header value |
Definition at line 37 of file http_types.cpp.
Referenced by kcenon::network::core::http_client::build_request().

| std::vector<uint8_t> kcenon::network::internal::http_request::body |
Definition at line 117 of file http_types.h.
Referenced by kcenon::network::core::http_client::build_request(), get_body_string(), and kcenon::network::internal::adapters::http_server_adapter::setup_internal_routes().
| std::map<std::string, std::string> kcenon::network::internal::http_request::cookies |
Definition at line 119 of file http_types.h.
| std::map<std::string, multipart_file> kcenon::network::internal::http_request::files |
Definition at line 121 of file http_types.h.
| std::map<std::string, std::string> kcenon::network::internal::http_request::form_data |
Definition at line 120 of file http_types.h.
| std::map<std::string, std::string> kcenon::network::internal::http_request::headers |
Definition at line 116 of file http_types.h.
| http_method kcenon::network::internal::http_request::method = http_method::HTTP_GET |
| std::map<std::string, std::string> kcenon::network::internal::http_request::query_params |
Definition at line 118 of file http_types.h.
Referenced by kcenon::network::core::http_client::build_request(), kcenon::network::core::http_request_context::get_query_param(), and kcenon::network::internal::http_parser::parse_request_line().
| std::string kcenon::network::internal::http_request::uri |
| http_version kcenon::network::internal::http_request::version = http_version::HTTP_1_1 |
Definition at line 115 of file http_types.h.
Referenced by kcenon::network::core::http_client::build_request(), and kcenon::network::internal::http_parser::parse_request_line().