mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-05-02 21:52:30 +02:00
Improve HTTP/S header handling, reorganize HTTPS.
This commit is contained in:
parent
45d27f8ddc
commit
03ecb957a5
5 changed files with 58 additions and 43 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue