Samchon Framework for CPP
1.0.0
|
A http, web-page loader. More...
#include <HTTPLoader.hpp>
Public Member Functions | |
HTTPLoader (const std::string &url, int method=POST) | |
Construct from request url and method. More... | |
void | setURL (const std::string &val) |
Set url. More... | |
void | setMethod (int val) |
Set method. More... | |
auto | getURL () const -> std::string |
Get url. More... | |
auto | getMethod () const -> int |
Get method. More... | |
auto | getCookie (const std::string &key) const -> std::string |
Get cookie. More... | |
auto | load (const URLVariables ¶meters={}) const -> ByteArray |
Load data from target url. More... | |
Static Private Member Functions | |
static HashMap< std::string, std::string > & | cookie_map () |
Cookies got from remote web server. More... | |
Private Attributes | |
int | method |
Method, Get or Post. More... | |
|
inline |
Construct from request url and method.
url | Target url of remote web server. |
method | Get or Post |
Definition at line 62 of file HTTPLoader.hpp.
References method.
|
inlinestaticprivate |
Cookies got from remote web server.
Definition at line 39 of file HTTPLoader.hpp.
Referenced by getCookie(), and load().
|
inline |
Set url.
Definition at line 75 of file HTTPLoader.hpp.
|
inline |
|
inline |
Get url.
Definition at line 91 of file HTTPLoader.hpp.
|
inline |
|
inline |
Get cookie.
Definition at line 107 of file HTTPLoader.hpp.
References cookie_map().
Referenced by load().
|
inline |
Load data from target url.
Loads binary data from target web server and address.
data | URLVariables containing parameters to request. |
Definition at line 128 of file HTTPLoader.hpp.
References samchon::WeakString::between(), cookie_map(), samchon::library::URLVariables::encode(), samchon::WeakString::find(), samchon::HashMap< Key, T, Hash, Pred, Alloc >::get(), getCookie(), samchon::HashMap< Key, T, Hash, Pred, Alloc >::has(), samchon::HashMap< Key, T, Hash, Pred, Alloc >::set(), samchon::WeakString::split(), samchon::WeakString::str(), samchon::library::StringUtil::substitute(), and samchon::WeakString::substr().
|
private |
Method, Get or Post.
Definition at line 34 of file HTTPLoader.hpp.
Referenced by getMethod(), HTTPLoader(), and setMethod().