aether::http_store Class Reference

makes an anonymous connection to an http or https server to retrieve a blob. More...

#include <backends.hh>

Public Member Functions

 http_store (const std::string &host, const std::string &port, const std::string &path="/", bool use_ssl=false)
 constructor, More...
 
std::vector< char > fetch (const std::string blob_name)
 fetches an object from the bucket and returns the data, if it fails returns an empty vector and error_msg is set More...
 
std::string get_error () const
 

Detailed Description

makes an anonymous connection to an http or https server to retrieve a blob.

The object can be configured via environment variables or providing the information in the constructor;

Constructor & Destructor Documentation

aether::http_store::http_store ( const std::string &  host,
const std::string &  port,
const std::string &  path = "/",
bool  use_ssl = false 
)

constructor,

Parameters
[in]host: name of the server to connect to
[in]port: port to use
[in]path: path of the assets in the server. optional, "/" by default.
[in]use_ssl: connect using https if true, http otherwise. optional, false by default

Member Function Documentation

std::vector<char> aether::http_store::fetch ( const std::string  blob_name)

fetches an object from the bucket and returns the data, if it fails returns an empty vector and error_msg is set

Parameters
[in]blob_name: object to be fetched
Returns
returns a vector with the data, empty if it fails
std::string aether::http_store::get_error ( ) const