Fix warnings in json_client example

This commit is contained in:
Mohammad Nejati
2024-09-19 08:32:04 +00:00
committed by Mohammad Nejati
parent 3ddcf4ed38
commit 7ce0ebe47c
2 changed files with 7 additions and 4 deletions

View File

@ -32,8 +32,9 @@ struct json_body
{
using const_buffers_type = boost::asio::const_buffer;
template<bool isRequest, class Fields>
writer(boost::beast::http::header<isRequest, Fields> const& h,
value_type const& body)
writer(
boost::beast::http::header<isRequest, Fields> const&,
value_type const& body)
{
// The serializer holds a pointer to the value, so all we need to do is to reset it.
serializer.reset(&body);
@ -65,7 +66,9 @@ struct json_body
struct reader
{
template<bool isRequest, class Fields>
reader(boost::beast::http::header<isRequest, Fields>& h, value_type& body)
reader(
boost::beast::http::header<isRequest, Fields>&,
value_type& body)
: body(body)
{
}

View File

@ -11,7 +11,7 @@ namespace http = beast::http; // from <boost/beast/http.hpp>
namespace net = boost::asio; // from <boost/asio.hpp>
using tcp = net::ip::tcp; // from <boost/asio/ip/tcp.hpp>
int main(int argc, char ** argv)
int main(int, char **)
{
// Our test endpoint for testing the json
const auto host = "postman-echo.com";