ngl_server 1.0
基于 Actor 模型的 C++ 服务器框架
ngl::tools::http_parm Struct Reference

HTTP请求参数结构体。 More...

#include <tools_curl.h>

Public Types

using callback = std::function<void(int, http_parm&)>

Public Member Functions

 http_parm (const http_parm &)=delete
http_parm & operator= (const http_parm &)=delete
 http_parm (http_parm &&)=delete
http_parm & operator= (http_parm &&)=delete
void headers (const std::vector< std::string > &aheaders)
void log (int aerror)

Public Attributes

ENUM_MODE m_mode = ENUM_MODE_NULL
ENUM_TYPE m_type = ENUM_TYPE_NULL
CURL * m_curl = nullptr
std::string m_url
std::string m_param
int m_timeout = 0
bool m_verify_peer = true
long m_verify_host = 2L
std::string m_cookies
curl_slist * m_headers = nullptr
callback m_callback = nullptr
std::string m_recvdata

Detailed Description

HTTP请求参数结构体。

封装libcurl的easy句柄和请求参数,支持HTTP/HTTPS、GET/POST、 自定义请求头、Cookie、超时配置等。

Note
不可拷贝和移动,析构时自动清理libcurl资源。

The documentation for this struct was generated from the following file: