libcoverart
1.0.0
|
Object for make HTTP requests. More...
Public Member Functions | |
CHTTPFetch (const std::string &UserAgent) | |
Constructor. More... | |
~CHTTPFetch () | |
void | SetUserName (const std::string &UserName) |
Set the user name to use. More... | |
void | SetPassword (const std::string &Password) |
Set the password to use. More... | |
void | SetProxyHost (const std::string &ProxyHost) |
Set the proxy server to use. More... | |
void | SetProxyPort (int ProxyPort) |
Set the proxy port to use. More... | |
void | SetProxyUserName (const std::string &ProxyUserName) |
Set the proxy user name to use. More... | |
void | SetProxyPassword (const std::string &ProxyPassword) |
Set the proxy password to use. More... | |
int | Fetch (const std::string &URL, bool FollowRedirects=true) |
Make a request to the server. More... | |
std::vector< unsigned char > | Data () const |
Get the data receieved. More... | |
int | Result () const |
libneon result code from the request More... | |
int | Status () const |
Status. More... | |
std::string | ErrorMessage () const |
Return the error message from the request. More... | |
Object to be used to make HTTP requests
CoverArtArchive::CHTTPFetch::CHTTPFetch | ( | const std::string & | UserAgent | ) |
Constructor
UserAgent | User agent string to send |
CoverArtArchive::CHTTPFetch::~CHTTPFetch | ( | ) |
std::vector<unsigned char> CoverArtArchive::CHTTPFetch::Data | ( | ) | const |
Get the data received from the request
std::string CoverArtArchive::CHTTPFetch::ErrorMessage | ( | ) | const |
Return the error message from the request
int CoverArtArchive::CHTTPFetch::Fetch | ( | const std::string & | URL, |
bool | FollowRedirects = true |
||
) |
Make a request to the server
URL | URL to request |
FollowRedirects | true to follow any redirects, false to return them |
CConnectionError | An error occurred connecting to the web server |
CTimeoutError | A timeout occurred when connecting to the web server |
CAuthenticationError | An authentication error occurred |
CFetchError | An error occurred fetching data |
CRequestError | The request was invalid |
CResourceNotFoundError | The requested resource was not found |
CRedirect | A redirect was received and not followed |
int CoverArtArchive::CHTTPFetch::Result | ( | ) | const |
Return the result code from the request
void CoverArtArchive::CHTTPFetch::SetPassword | ( | const std::string & | Password | ) |
Set the password to use when authenticating with the web server
Password | Password to use |
void CoverArtArchive::CHTTPFetch::SetProxyHost | ( | const std::string & | ProxyHost | ) |
Set the proxy server to use when connecting with the web server
ProxyHost | Proxy server to use |
void CoverArtArchive::CHTTPFetch::SetProxyPassword | ( | const std::string & | ProxyPassword | ) |
Set the password to use when authenticating with the proxy server
ProxyPassword | Proxy server password to use |
void CoverArtArchive::CHTTPFetch::SetProxyPort | ( | int | ProxyPort | ) |
Set the proxy server port to use when connecting to the web server
ProxyPort | Proxy server port to use |
void CoverArtArchive::CHTTPFetch::SetProxyUserName | ( | const std::string & | ProxyUserName | ) |
Set the user name to use when authenticating with the proxy server
ProxyUserName | Proxy user name to use |
void CoverArtArchive::CHTTPFetch::SetUserName | ( | const std::string & | UserName | ) |
Set the user name to use when authenticating with the web server
UserName | User name to use |
int CoverArtArchive::CHTTPFetch::Status | ( | ) | const |
Return the HTTP status code from the request