Files
        @ 7bfca5a9f676
    
        
              Branch filter: 
        
    Location: libtransport.git/backends/twitter/HTTPRequest.h - annotation
        
            
            7bfca5a9f676
            707 B
            text/plain
        
        
    
    WebSocketClient: clear previous state after reconnect
    9e70a739b7c2 9e70a739b7c2 9e70a739b7c2 50119c8e4ef2 78e71f9345c7 9e70a739b7c2 9e70a739b7c2 9e70a739b7c2 9e70a739b7c2 9e70a739b7c2 9e70a739b7c2 9e70a739b7c2 9e70a739b7c2 9e70a739b7c2 9e70a739b7c2 9e70a739b7c2 9e70a739b7c2 9e70a739b7c2 9e70a739b7c2 9e70a739b7c2 9e70a739b7c2 9e70a739b7c2 9e70a739b7c2 9e70a739b7c2 9e70a739b7c2 9e70a739b7c2 9e70a739b7c2 9e70a739b7c2 9e70a739b7c2 9e70a739b7c2 9e70a739b7c2 9e70a739b7c2 9e70a739b7c2 9e70a739b7c2 9e70a739b7c2 9e70a739b7c2 9e70a739b7c2  | #ifndef HTTPREQ_H
#define HTTPREQ_H
#include "curl/curl.h"
#include "transport/Logging.h"
#include <iostream>
#include <sstream>
#include <string.h>
class HTTPRequest
{
	CURL *curlhandle;
	char curl_errorbuffer[1024];
	std::string error;
	std::string callbackdata;
    static int curlCallBack(char* data, size_t size, size_t nmemb, HTTPRequest *obj);
	public:
	HTTPRequest() {
		curlhandle = NULL;
	}
	~HTTPRequest() {
		if(curlhandle) {
			curl_easy_cleanup(curlhandle);
			curlhandle = NULL;
		}
	}
	bool init();
	void setProxy(std::string, std::string, std::string, std::string);
	bool GET(std::string, std::string &);
	std::string getCurlError() {return std::string(curl_errorbuffer);}
};
#endif
 |