libcryfs/network/CurlHttpClient.h

29 lines
580 B
C
Raw Normal View History

2015-11-24 07:47:29 +01:00
#pragma once
#ifndef MESSMER_CPPUTILS_NETWORK_HTTPCLIENT_HPP
#define MESSMER_CPPUTILS_NETWORK_HTTPCLIENT_HPP
#include "HttpClient.h"
#include "../macros.h"
namespace cpputils {
class CurlHttpClient final : public HttpClient {
public:
CurlHttpClient();
~CurlHttpClient();
boost::optional <std::string> get(const std::string &url) override;
private:
void *curl;
static size_t write_data(void *ptr, size_t size, size_t nmemb, std::ostringstream *stream);
DISALLOW_COPY_AND_ASSIGN(CurlHttpClient);
};
}
#endif