|
Samchon Framework for CPP
1.0.0
|
A http, web-page loader. More...
#include <HTTPLoader.hpp>

Public Member Functions | |
| HTTPLoader (int method=POST) | |
| Construct from request method. More... | |
| HTTPLoader (const std::string &, int method=POST) | |
| Construct from request url and method. More... | |
| void | setURL (const std::string &) |
| Set url. More... | |
| void | setMethod (int) |
| Set method. More... | |
| auto | getURL () const -> std::string |
| Get url. More... | |
| auto | getMethod () const -> int |
| Get method. More... | |
| auto | getCookie (const std::string &) const -> std::string |
| Get cookie. More... | |
| auto | load (const URLVariables &={}) const -> ByteArray |
| Load data from target url. More... | |
Private Attributes | |
| int | method |
| Method, Get or Post. More... | |
Static Private Attributes | |
| static HashMap< std::string, std::string > | cookieMap |
| Cookies got from remote web server. More... | |
A http, web-page loader.
Definition at line 23 of file HTTPLoader.hpp.
| HTTPLoader::HTTPLoader | ( | int | method = POST | ) |
Construct from request method.
| method | Get or Post. |
Definition at line 26 of file HTTPLoader.cpp.
| samchon::library::HTTPLoader::HTTPLoader | ( | const std::string & | , |
| int | method = POST |
||
| ) |
Construct from request url and method.
| url | Target url of remote web server. |
| method | Get or Post |
| void HTTPLoader::setURL | ( | const std::string & | ) |
Set url.
Definition at line 39 of file HTTPLoader.cpp.
| void HTTPLoader::setMethod | ( | int | method | ) |
Set method.
Definition at line 43 of file HTTPLoader.cpp.
| auto HTTPLoader::getURL | ( | ) | const -> std::string |
Get url.
Definition at line 48 of file HTTPLoader.cpp.
| auto HTTPLoader::getMethod | ( | ) | const -> int |
Get method.
Definition at line 52 of file HTTPLoader.cpp.
| auto HTTPLoader::getCookie | ( | const std::string & | ) | const -> std::string |
Get cookie.
Definition at line 57 of file HTTPLoader.cpp.
| auto HTTPLoader::load | ( | const URLVariables & | parameters = {} | ) | const -> ByteArray |
Load data from target url.
Loads binary data from target web server and address.
| data | URLVariables containing parameters to request. |
Definition at line 100 of file HTTPLoader.cpp.
References samchon::WeakString::between(), samchon::WeakString::find(), samchon::HashMap< Key, T, Hash, Pred, Alloc >::get(), samchon::HashMap< Key, T, Hash, Pred, Alloc >::has(), samchon::HashMap< Key, T, Hash, Pred, Alloc >::set(), samchon::WeakString::split(), samchon::WeakString::str(), and samchon::WeakString::substr().

|
private |
Method, Get or Post.
Definition at line 31 of file HTTPLoader.hpp.
|
staticprivate |
Cookies got from remote web server.
Definition at line 36 of file HTTPLoader.hpp.