Skip to content
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
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ set(BOOST_HTTP_PROTO_DEPENDENCIES
Boost::capy
Boost::config
Boost::core
Boost::json
Boost::mp11
Boost::static_assert
Boost::system
Expand Down Expand Up @@ -122,7 +123,7 @@ if (BOOST_HTTP_PROTO_IS_ROOT)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${BOOST_SRC_DIR}/tools/cmake/include")
else ()
# From Boost Package
find_package(Boost REQUIRED COMPONENTS buffers filesystem url)
find_package(Boost REQUIRED COMPONENTS buffers filesystem json url)
foreach (BOOST_INCLUDE_LIBRARY ${BOOST_INCLUDE_LIBRARIES})
if (NOT TARGET Boost::${BOOST_INCLUDE_LIBRARY})
add_library(Boost::${BOOST_INCLUDE_LIBRARY} ALIAS Boost::headers)
Expand Down
2 changes: 2 additions & 0 deletions build/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,14 @@ lib boost_http_proto
: requirements
<library>/boost//buffers
<library>/boost//capy
<library>/boost/json//boost_json/<warnings-as-errors>off
<library>/boost//url
<include>../
<define>BOOST_HTTP_PROTO_SOURCE
: usage-requirements
<library>/boost//buffers
<library>/boost//capy
<library>/boost/json//boost_json/<warnings-as-errors>off
<library>/boost//url
;

Expand Down
22 changes: 22 additions & 0 deletions include/boost/http_proto/json.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//
// Copyright (c) 2025 Vinnie Falco (vinnie.falco@gmail.com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// Official repository: https://github.com/cppalliance/http_proto
//

#ifndef BOOST_HTTP_PROTO_JSON_HPP
#define BOOST_HTTP_PROTO_JSON_HPP

#include <boost/http_proto/detail/config.hpp>
#include <boost/json/value.hpp>

namespace boost {
namespace http_proto {

} // http_proto
} // boost

#endif
3 changes: 2 additions & 1 deletion src/server/route_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,9 @@ spawn(
return;
}
auto rv = std::move(std::get<1>(r));
auto resume_ = resume; // would be destroyed
h.destroy();
resume(rv);
resume_(rv);
};

ex.post([h]() { h.resume(); });
Expand Down
11 changes: 11 additions & 0 deletions test/unit/json.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
//
// Copyright (c) 2025 Vinnie Falco (vinnie dot falco at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// Official repository: https://github.com/cppalliance/http_proto
//

// Test that header file is self-contained.
#include <boost/http_proto/json.hpp>
Loading