can GET some pages

This commit is contained in:
Benjamin Sergeant
2019-02-14 20:11:42 -08:00
parent 29c96f287f
commit 0b7c3ec235
11 changed files with 399 additions and 183 deletions

View File

@@ -11,13 +11,14 @@
#include <mutex>
#include <atomic>
#include <tuple>
#include <memory>
#include "IXSocket.h"
#include "IXWebSocketHttpHeaders.h"
namespace ix
{
using HttpResponse = std::tuple<int, WebSocketHttpHeaders, std::string>;
using HttpResponse = std::tuple<int, WebSocketHttpHeaders, std::string, std::string>;
class HttpClient {
public:
@@ -25,10 +26,9 @@ namespace ix
~HttpClient();
// Static methods ?
HttpResponse get(const std::string& url);
HttpResponse post(const std::string& url);
HttpResponse get(const std::string& url, bool verbose);
private:
Socket _socket;
std::shared_ptr<Socket> _socket;
};
}