Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warnings in json_client example #2930

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions example/http/client/body/json_body.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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)
{
}
Expand Down
2 changes: 1 addition & 1 deletion example/http/client/body/json_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
Loading