#ifndef COCOATWEET_API_INTERFACE_HTTPBASE_H_ #define COCOATWEET_API_INTERFACE_HTTPBASE_H_ #include #include #include "cocoatweet/authentication/authenticator.h" namespace CocoaTweet::API::Interface { class HttpBase { public: protected: std::weak_ptr oauth_; std::map bodyParam_; std::string url_; std::string contentType_; virtual void process(std::weak_ptr _oauth, std::function _callback) = 0; static size_t curlCallback_(char* _ptr, size_t _size, size_t _nmemb, std::string* _stream) { int realsize = _size * _nmemb; _stream->append(_ptr, realsize); return realsize; } }; } // namespace CocoaTweet::API::Interface #endif