HttpClient.h
Go to the documentation of this file.
00001 
00011 #ifndef SPATIAL_TEMPORAL_LEARNING_WORLDLIB_REMOTE_HTTP_CLIENT_H_
00012 #define SPATIAL_TEMPORAL_LEARNING_WORLDLIB_REMOTE_HTTP_CLIENT_H_
00013 
00014 // worldlib
00015 #include "Client.h"
00016 
00017 // cURL
00018 #include <curl/curl.h>
00019 
00020 namespace rail
00021 {
00022 namespace spatial_temporal_learning
00023 {
00024 namespace worldlib
00025 {
00026 namespace remote
00027 {
00028 
00035 class HttpClient : public Client
00036 {
00037 public:
00039   static const unsigned int DEFAULT_PORT = 80;
00040 
00048   HttpClient(const HttpClient &client);
00049 
00058   HttpClient(const std::string &host = "localhost", const uint16_t port = 80);
00059 
00065   virtual ~HttpClient();
00066 
00067 protected:
00077   std::string get(const std::string &url) const;
00078 
00079 private:
00081   CURL *curl_;
00083   std::string base_;
00084 
00090   void init();
00091 };
00092 
00104 static size_t curlWriteFunction(const void *contents, const size_t size, const size_t num, void *buffer);
00105 
00106 }
00107 }
00108 }
00109 }
00110 
00111 #endif


worldlib
Author(s): Russell Toris
autogenerated on Fri Feb 12 2016 00:24:18