|
Adbase
Adinf C++ base library V2
|
#include <Request.hpp>
Public Types | |
| enum | httpMethod { METHOD_GET = 0, METHOD_POST = 1, METHOD_OTHER = 2 } |
Public Member Functions | |
| Request (evhttp_request *req) | |
| Request::httpMethod | getMethod () |
| 获取请求方式 More... | |
| const std::string | getUri () const |
| 获取请求 URI 地址 More... | |
| const std::string | getLocation () const |
| 获取请求 Location 地址 More... | |
| const std::string | getHeader (const std::string &key) const |
| 获取headers 信息 More... | |
| const std::string | getQuery (const std::string &key) const |
| 获取 GET 数据 信息 More... | |
| const std::string | getPost (const std::string &key) const |
| 获取 POST FROM-TYPE 数据 信息 More... | |
| const std::string | getPostData () const |
| 获取 POST 元数据 More... | |
| const std::string | getRemoteAddress () const |
| 获取客户端IP More... | |
| virtual | ~Request () |
Definition at line 21 of file Request.hpp.
| Enumerator | |
|---|---|
| METHOD_GET | |
| METHOD_POST | |
| METHOD_OTHER | |
Definition at line 23 of file Request.hpp.
| adbase::http::Request::Request | ( | evhttp_request * | req | ) |
Definition at line 7 of file Request.cpp.
|
inlinevirtual |
Definition at line 55 of file Request.hpp.
| const std::string adbase::http::Request::getHeader | ( | const std::string & | key | ) | const |
获取headers 信息
Definition at line 53 of file Request.cpp.
Referenced by adbase::http::Server::onRequestCallback().
| const std::string adbase::http::Request::getLocation | ( | ) | const |
获取请求 Location 地址
Definition at line 38 of file Request.cpp.
Referenced by adbase::http::Server::onRequestCallback().
| Request::httpMethod adbase::http::Request::getMethod | ( | ) |
获取请求方式
Definition at line 14 of file Request.cpp.
References METHOD_GET, METHOD_OTHER, and METHOD_POST.
Referenced by adbase::http::Server::onRequestCallback().
| const std::string adbase::http::Request::getPost | ( | const std::string & | key | ) | const |
获取 POST FROM-TYPE 数据 信息
Definition at line 99 of file Request.cpp.
| const std::string adbase::http::Request::getPostData | ( | ) | const |
获取 POST 元数据
Definition at line 81 of file Request.cpp.
| const std::string adbase::http::Request::getQuery | ( | const std::string & | key | ) | const |
获取 GET 数据 信息
Definition at line 66 of file Request.cpp.
| const std::string adbase::http::Request::getRemoteAddress | ( | ) | const |
获取客户端IP
Definition at line 121 of file Request.cpp.
Referenced by adbase::http::Server::onRequestCallback().
| const std::string adbase::http::Request::getUri | ( | ) | const |
获取请求 URI 地址
Definition at line 30 of file Request.cpp.
Referenced by adbase::http::Server::onRequestCallback().