Improve HTTP/S header handling, reorganize HTTPS.

This commit is contained in:
anonimal 2015-10-15 05:19:19 +00:00
parent 45d27f8ddc
commit 03ecb957a5
5 changed files with 58 additions and 43 deletions

View file

@ -124,6 +124,18 @@ namespace util
const char LAST_MODIFIED[] = "Last-Modified";
const char TRANSFER_ENCODING[] = "Transfer-Encoding";
/**
* Header for HTTP/S requests.
* @return a string of the complete header
*/
std::string httpHeader(const std::string& path, const std::string& host, const std::string& version);
/**
* Perform an HTTPS request.
* @return the result of the request, or an empty string if it fails
*/
std::string httpsRequest(const std::string& address);
/**
* Perform an HTTP request.
* @return the result of the request, or an empty string if it fails