Exemplo n.º 1
0
bool HTTPClient::GET(const std::string url, std::string &response)
{
	std::vector<unsigned char> vHTTPResponse;
	if (!GETBinary(url,vHTTPResponse))
		return false;
	response="";
	response.insert( response.begin(), vHTTPResponse.begin(), vHTTPResponse.end() );
	return true;
}
Exemplo n.º 2
0
bool HTTPClient::GET(const std::string &url, const std::vector<std::string> &ExtraHeaders, std::string &response)
{
	response = "";
	std::vector<unsigned char> vHTTPResponse;
	if (!GETBinary(url,ExtraHeaders,vHTTPResponse))
		return false;
	if (vHTTPResponse.empty())
		return false;
	response.insert(response.begin(), vHTTPResponse.begin(), vHTTPResponse.end());
	return true;
}