保存HTTP/HTTPS请求信息的结构体
更多...
#include <sttnet.h>
|
| std::string_view | headerValue (std::string_view name) const noexcept |
| | 按大小写不敏感方式读取请求头,不分配内存。
|
| |
| std::string_view | bodyView () const noexcept |
| | 统一读取 Content-Length 或 chunked 请求体。
|
| |
◆ bodyView()
| std::string_view stt::network::HttpRequestInformation::bodyView |
( |
| ) |
const |
|
noexcept |
统一读取 Content-Length 或 chunked 请求体。
- 返回
- 指向
body 或 body_chunked 的非拥有视图。
◆ headerValue()
| std::string_view stt::network::HttpRequestInformation::headerValue |
( |
std::string_view | name | ) |
const |
|
noexcept |
按大小写不敏感方式读取请求头,不分配内存。
- 参数
-
| name | 不带冒号的 header 名,例如 content-type。 |
- 返回
- 指向当前
header 字符串的视图;不存在时返回空视图。
- 警告
- 修改或销毁本请求后,返回的视图失效。
◆ body
| std::string stt::network::HttpRequestInformation::body |
◆ body_chunked
| std::string stt::network::HttpRequestInformation::body_chunked |
◆ connection_obj_fd
| uint64_t stt::network::HttpRequestInformation::connection_obj_fd =0 |
◆ ctx
| std::unordered_map<std::string,std::any> stt::network::HttpRequestInformation::ctx |
◆ fd
| int stt::network::HttpRequestInformation::fd =-1 |
◆ header
| std::string stt::network::HttpRequestInformation::header |
◆ loc
| std::string stt::network::HttpRequestInformation::loc |
◆ locPara
| std::string stt::network::HttpRequestInformation::locPara |
◆ para
| std::string stt::network::HttpRequestInformation::para |
◆ type
| std::string stt::network::HttpRequestInformation::type |
该结构体的文档由以下文件生成: