Add optional fd parameter to sendHTTPRequest() in order to directly write received data in a buffer and not in an intermediate buffer

This commit is contained in:
2022-03-17 21:55:02 +01:00
parent 2ce6142596
commit 1221b2a95a
7 changed files with 55 additions and 18 deletions

View File

@@ -98,10 +98,11 @@ namespace gourou
* @param POSTData POST data if needed, if not set, a GET request is done
* @param contentType Optional content type of POST Data
* @param responseHeaders Optional Response headers of HTTP request
* @param fd Optional file descriptor to write request result
*
* @return data of HTTP response
*/
virtual std::string sendHTTPRequest(const std::string& URL, const std::string& POSTData=std::string(""), const std::string& contentType=std::string(""), std::map<std::string, std::string>* responseHeaders=0) = 0;
virtual std::string sendHTTPRequest(const std::string& URL, const std::string& POSTData=std::string(""), const std::string& contentType=std::string(""), std::map<std::string, std::string>* responseHeaders=0, int fd=0) = 0;
};
class RSAInterface