mirror of
https://github.com/boostorg/beast.git
synced 2025-08-03 14:54:32 +02:00
@@ -4,6 +4,7 @@ Version 64:
|
|||||||
* Simplify ssl teardown composed op
|
* Simplify ssl teardown composed op
|
||||||
* Simplify websocket write_op
|
* Simplify websocket write_op
|
||||||
* Exemplars are compiled code
|
* Exemplars are compiled code
|
||||||
|
* Better User-Agent in examples
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
#include <beast/core.hpp>
|
#include <beast/core.hpp>
|
||||||
#include <beast/http.hpp>
|
#include <beast/http.hpp>
|
||||||
|
#include <beast/version.hpp>
|
||||||
#include <boost/asio.hpp>
|
#include <boost/asio.hpp>
|
||||||
#include <boost/asio/ssl.hpp>
|
#include <boost/asio/ssl.hpp>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
@@ -62,7 +63,7 @@ int main()
|
|||||||
req.version = 11;
|
req.version = 11;
|
||||||
req.set(http::field::host, host + ":" +
|
req.set(http::field::host, host + ":" +
|
||||||
std::to_string(sock.remote_endpoint().port()));
|
std::to_string(sock.remote_endpoint().port()));
|
||||||
req.set(http::field::user_agent, "Beast");
|
req.set(http::field::user_agent, BEAST_VERSION_STRING);
|
||||||
req.prepare_payload();
|
req.prepare_payload();
|
||||||
|
|
||||||
// Write the HTTP request to the remote host
|
// Write the HTTP request to the remote host
|
||||||
|
@@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
#include <beast/core.hpp>
|
#include <beast/core.hpp>
|
||||||
#include <beast/http.hpp>
|
#include <beast/http.hpp>
|
||||||
|
#include <beast/version.hpp>
|
||||||
#include <boost/asio.hpp>
|
#include <boost/asio.hpp>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
@@ -53,7 +54,7 @@ int main()
|
|||||||
req.version = 11;
|
req.version = 11;
|
||||||
req.set(http::field::host, host + ":" +
|
req.set(http::field::host, host + ":" +
|
||||||
std::to_string(sock.remote_endpoint().port()));
|
std::to_string(sock.remote_endpoint().port()));
|
||||||
req.set(http::field::user_agent, "Beast");
|
req.set(http::field::user_agent, BEAST_VERSION_STRING);
|
||||||
req.prepare_payload();
|
req.prepare_payload();
|
||||||
|
|
||||||
// Write the HTTP request to the remote host
|
// Write the HTTP request to the remote host
|
||||||
|
Reference in New Issue
Block a user