Refactor HTTP serialization and parsing (API Change):

fix #404

Parsing and serialization interfaces have been fine tuned and unified.

For parsing these stream operations are defined:

* read
* read_header
* read_some
* async_read
* async_read_header
* async_read_some

For serialization these stream operations are defined:

* write
* write_header
* write_some
* async_write
* async_write_header
* async_write_some
This commit is contained in:
Vinnie Falco
2017-07-20 08:12:17 -07:00
parent b76eb2864e
commit 02d5aedc29
44 changed files with 3655 additions and 3250 deletions
+2 -2
View File
@@ -15,7 +15,7 @@
int main()
{
// Normal boost::asio setup
std::string const host = "boost.org";
std::string const host = "www.example.com";
boost::asio::io_service ios;
boost::asio::ip::tcp::resolver r{ios};
boost::asio::ip::tcp::socket sock{ios};
@@ -37,5 +37,5 @@ int main()
beast::flat_buffer b;
beast::http::response<beast::http::dynamic_body> res;
beast::http::read(sock, b, res);
std::cout << res;
std::cout << res << std::endl;
}