|
VideoTools
|
A protocol driver for an http client. More...
#include <ghttpclientprotocol.h>
Classes | |
| struct | Callback |
| A callback interface for GNet::HttpClientProtocol to send data and deliver content. More... | |
Public Member Functions | |
| HttpClientProtocol (Callback &, const G::Url &url) | |
| Constructor. | |
| void | start () |
| Assembles a GET request (based on the constructor url) and asks the callback interface to send it. More... | |
| void | apply (const char *, size_t) |
| To be called on receipt of data. More... | |
Static Public Member Functions | |
| static std::string | authorisation (const GNet::HttpClientParser &, const G::Url &, std::string get=std::string(), bool=false) |
| Returns an "Authorization" header for adding to a "GET" request. | |
A protocol driver for an http client.
Supports "multipart" responses, with each part is delivered separately as if a self-contained body. Also supports digest authentication, with the authentication secrets being supplied in the URL.
Definition at line 43 of file ghttpclientprotocol.h.
| void GNet::HttpClientProtocol::apply | ( | const char * | , |
| size_t | |||
| ) |
To be called on receipt of data.
Throws Auth if authentication is required but not supplied; throws Retry for a service-unavailble response; throws Fail on error.
Definition at line 43 of file ghttpclientprotocol.cpp.
| void GNet::HttpClientProtocol::start | ( | ) |
Assembles a GET request (based on the constructor url) and asks the callback interface to send it.
Definition at line 38 of file ghttpclientprotocol.cpp.