IXWebSocket/ixwebsocket/IXHttpClient.h
Benjamin Sergeant 2a17cad1bf add skeleton and broken http client code.
GET returns "Resource temporarily unavailable" errors...
2019-02-14 10:14:57 -08:00

35 lines
640 B
C++

/*
* IXHttpClient.h
* Author: Benjamin Sergeant
* Copyright (c) 2019 Machine Zone, Inc. All rights reserved.
*/
#pragma once
#include <algorithm>
#include <functional>
#include <mutex>
#include <atomic>
#include <tuple>
#include "IXSocket.h"
#include "IXWebSocketHttpHeaders.h"
namespace ix
{
using HttpResponse = std::tuple<int, WebSocketHttpHeaders, std::string>;
class HttpClient {
public:
HttpClient();
~HttpClient();
// Static methods ?
HttpResponse get(const std::string& url);
HttpResponse post(const std::string& url);
private:
Socket _socket;
};
}