Merge subtree Beast 1.0.0-b3

Merge commit '47eb7fcc2f30df883b0036d97aac6a0fa90b0e9f'
This commit is contained in:
Vinnie Falco
2016-05-06 14:52:15 -04:00
157 changed files with 7040 additions and 4117 deletions

View File

@@ -17,8 +17,8 @@
*/
//==============================================================================
#include "http_stream.h"
#include "urls_large_data.h"
#include "http_stream.hpp"
#include "urls_large_data.hpp"
#include <boost/asio.hpp>
#include <iostream>
@@ -46,12 +46,13 @@ int main(int, char const*[])
stream<ip::tcp::socket> hs(ios);
connect(hs.lowest_layer(), it);
auto ep = hs.lowest_layer().remote_endpoint();
request<empty_body> req({method_t::http_get, "/", 11});
request_v1<empty_body> req({"GET", "/", 11});
req.headers.insert("Host", host +
std::string(":") + std::to_string(ep.port()));
req.headers.insert("User-Agent", "beast/http");
prepare(req);
hs.write(req);
response<string_body> resp;
response_v1<string_body> resp;
hs.read(resp);
std::cout << resp;
}