#include <iostream>
#include <boost/beast.hpp>
namespace asio = boost::asio;
namespace beast = boost::beast;
namespace http = boost::beast::http;
int main(int argc, char** argv)
{
asio::io_context io;
asio::ip::tcp::socket socket(io);
asio::ip::tcp::resolver resolver(io);
asio::connect(socket, resolver.resolve("scooterlabs.com", "http"));
http::request<http::empty_body> request(http::verb::get, "/echo", 11);
request.set(http::field::host, "scooterlabs.com");
request.set(http::field::user_agent, BOOST_BEAST_VERSION_STRING);
http::write(socket, request);
beast::flat_buffer buffer;
http::response<http::string_body> response;
http::read(socket, buffer, response);
std::cout << response.body() << std::endl;
socket.shutdown(socket.shutdown_both);
return 0;
}