foobar2000 SDK  2015-08-03
Private Member Functions
http_requestabstract

#include <http_client.h>

+ Inheritance diagram for http_request:

Private Member Functions

void add_header (const char *name, const char *value)
 
virtual FB2K_MAKE_SERVICE_INTERFACE(http_request, service_base) public file::ptr run (const char *url, abort_callback &abort)=0
 
virtual file::ptr run_ex (const char *url, abort_callback &abort)=0
 

Additional Inherited Members

- Public Types inherited from service_base
typedef service_base t_interface
 
- Public Member Functions inherited from service_base
template<typename outPtr_t >
bool cast (outPtr_t &outPtr)
 
virtual int service_add_ref ()=0 throw ()
 
virtual bool service_query (service_ptr_t< service_base > &p_out, const GUID &p_guid)
 
template<class T >
bool service_query_t (service_ptr_t< T > &p_out)
 
virtual int service_release ()=0 throw ()
 
- Protected Member Functions inherited from service_base
 service_base ()
 
 ~service_base ()
 

Detailed Description

Definition at line 14 of file http_client.h.

Member Function Documentation

void http_request::add_header ( const char *  name,
const char *  value 
)
inlineprivate

Definition at line 25 of file http_client.h.

25  {
26  add_header(PFC_string_formatter() << name << ": " << value);
27  }
void add_header(const char *name, const char *value)
Definition: http_client.h:25
virtual FB2K_MAKE_SERVICE_INTERFACE (http_request, service_base) public file::ptr http_request::run ( const char *  url,
abort_callback abort 
)
privatepure virtual

Runs the request on the specified URL. Throws an exception on failure (connection error, invalid response from the server, reply code other than 2XX), returns a file::ptr interface to the stream on success.

virtual file::ptr http_request::run_ex ( const char *  url,
abort_callback abort 
)
privatepure virtual

Runs the request on the specified URL. Throws an exception on failure but returns normally if the HTTP server returned a valid response other than 2XX, so the caller can still parse the received data stream if the server has returned an error.


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