2019-07-27 22:44:32 +08:00
|
|
|
|
#pragma once
|
2015-12-19 12:08:14 +08:00
|
|
|
|
|
|
|
|
|
class https_request : public acl::thread
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
https_request(const char* addr, acl::polarssl_conf* ssl_conf);
|
|
|
|
|
~https_request(void);
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
// override
|
|
|
|
|
void* run(void);
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
acl::http_request request_;
|
|
|
|
|
acl::string to_charset_;
|
|
|
|
|
|
2019-07-27 22:44:32 +08:00
|
|
|
|
// 澶勭悊 text/plain 绫诲瀷鏁版嵁
|
2015-12-19 12:08:14 +08:00
|
|
|
|
bool do_plain(acl::http_request& req);
|
|
|
|
|
|
2019-07-27 22:44:32 +08:00
|
|
|
|
// 澶勭悊 text/xml 绫诲瀷鏁版嵁
|
2015-12-19 12:08:14 +08:00
|
|
|
|
bool do_xml(acl::http_request& req);
|
|
|
|
|
|
2019-07-27 22:44:32 +08:00
|
|
|
|
// 澶勭悊 text/json 绫诲瀷鏁版嵁
|
2015-12-19 12:08:14 +08:00
|
|
|
|
bool do_json(acl::http_request& req);
|
|
|
|
|
};
|