VideoTools
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
GNet::HttpClientProtocol Class Reference

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.
 

Detailed Description

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.

Member Function Documentation

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.


The documentation for this class was generated from the following files: