Пример #1
0
bool HTTPClient::PUT(const std::string url, const std::string postdata, const std::vector<std::string> ExtraHeaders, std::string &response)
{
    std::vector<unsigned char> vHTTPResponse;
    if (!PUTBinary(url,postdata,ExtraHeaders, vHTTPResponse))
        return false;
    response.insert( response.begin(), vHTTPResponse.begin(), vHTTPResponse.end() );
    return true;
}
Пример #2
0
bool HTTPClient::PUT(const std::string &url, const std::string &postdata, const std::vector<std::string> &ExtraHeaders, std::string &response)
{
	response = "";
	std::vector<unsigned char> vHTTPResponse;
	if (!PUTBinary(url,postdata,ExtraHeaders, vHTTPResponse))
		return false;
	if (vHTTPResponse.empty())
		return true; //empty response possible
	response.insert(response.begin(), vHTTPResponse.begin(), vHTTPResponse.end());
	return true;
}