IXWebSocket/ixwebsocket/IXHttpClient.h

35 lines
651 B
C
Raw Normal View History

/*
* 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>
2019-02-15 05:11:42 +01:00
#include <memory>
#include "IXSocket.h"
#include "IXWebSocketHttpHeaders.h"
namespace ix
{
2019-02-15 05:11:42 +01:00
using HttpResponse = std::tuple<int, WebSocketHttpHeaders, std::string, std::string>;
class HttpClient {
public:
HttpClient();
~HttpClient();
// Static methods ?
2019-02-15 05:11:42 +01:00
HttpResponse get(const std::string& url, bool verbose);
private:
2019-02-15 05:11:42 +01:00
std::shared_ptr<Socket> _socket;
};
}