HttpClient.
More...
#include <HttpClient.h>
|
static Ptr | create (const std::string &url, const std::string &proxy="") |
|
◆ Ptr
◆ ReadCallback
◆ WriteCallback
◆ ~HttpClient()
sese::net::http::HttpClient::~HttpClient |
( |
| ) |
|
◆ HttpClient()
sese::net::http::HttpClient::HttpClient |
( |
| ) |
|
|
privatedefault |
◆ create()
HttpClient::Ptr sese::net::http::HttpClient::create |
( |
const std::string & | url, |
|
|
const std::string & | proxy = "" ) |
|
static |
◆ getLastError()
int sese::net::http::HttpClient::getLastError |
( |
| ) |
const |
Get the last error
- Returns
- Last error
References impl.
◆ getLastErrorString()
std::string sese::net::http::HttpClient::getLastErrorString |
( |
| ) |
const |
Get the last error string
- Returns
- Last error string
References impl.
◆ getRequest()
Request::Ptr & sese::net::http::HttpClient::getRequest |
( |
| ) |
const |
Get request headers
- Returns
- Request headers
References impl.
◆ getResponse()
Response::Ptr & sese::net::http::HttpClient::getResponse |
( |
| ) |
const |
Get response headers
- Returns
- Response headers
References impl.
◆ read()
int64_t sese::net::http::HttpClient::read |
( |
void * | buf, |
|
|
size_t | len ) const |
◆ request()
bool sese::net::http::HttpClient::request |
( |
| ) |
const |
◆ setReadCallback()
void sese::net::http::HttpClient::setReadCallback |
( |
const ReadCallback & | read_callback, |
|
|
size_t | expect_total ) const |
Set the external source of the request body, this option will reset after the request is completed
- Parameters
-
read_callback | Callback function to read the body, returns the size read, if incomplete reading, the transfer stops |
expect_total | Expected size of the body |
References impl.
◆ setReadData()
void sese::net::http::HttpClient::setReadData |
( |
io::PeekableStream * | read_data, |
|
|
size_t | expect_total ) const |
Set the external source of the request body, this option will reset after the request is completed
- Parameters
-
read_data | Source of the body to read |
expect_total | Expected size of the body |
References impl.
◆ setWriteCallback()
void sese::net::http::HttpClient::setWriteCallback |
( |
const WriteCallback & | write_callback | ) |
const |
Set the external destination of the response body, this option will reset after the request is completed
- Parameters
-
write_callback | Callback function to receive the body, returns the size written, if incomplete writing, the transfer stops |
References impl.
◆ setWriteData()
void sese::net::http::HttpClient::setWriteData |
( |
io::OutputStream * | write_data | ) |
const |
Set the external destination of the response body, this option will reset after the request is completed
- Parameters
-
write_data | Destination to receive the body |
References impl.
◆ write()
int64_t sese::net::http::HttpClient::write |
( |
const void * | buf, |
|
|
size_t | len ) const |
◆ impl
std::unique_ptr<Impl> sese::net::http::HttpClient::impl |
|
private |
Referenced by getLastError(), getLastErrorString(), getRequest(), getResponse(), read(), request(), setReadCallback(), setReadData(), setWriteCallback(), setWriteData(), and write().
The documentation for this class was generated from the following files: