include/boost/burl/detail/request_parser.hpp

100.0% Lines (8/8) 100.0% List of functions (3/3) 100.0% Branches (1/1)
request_parser.hpp
f(x) Functions (3)
Line Branch TLA Hits Source Code
1 //
2 // Copyright (c) 2026 Mohammad Nejati
3 //
4 // Distributed under the Boost Software License, Version 1.0. (See accompanying
5 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 //
7 // Official repository: https://github.com/cppalliance/burl
8 //
9
10 #ifndef BOOST_BURL_DETAIL_REQUEST_PARSER_HPP
11 #define BOOST_BURL_DETAIL_REQUEST_PARSER_HPP
12
13 #include <boost/burl/detail/parser.hpp>
14
15 #include <boost/http/static_request.hpp>
16
17 #include <utility>
18
19 namespace boost
20 {
21 namespace burl
22 {
23 namespace detail
24 {
25
26 class request_parser
27 : public parser
28 {
29 public:
30 request_parser() = default;
31
32 explicit
33 1x request_parser(
34 config const& cfg,
35 capy::any_read_stream stream = {})
36
1/1
✓ Branch 3 taken 1 time.
1x : parser(cfg, http::detail::kind::request, std::move(stream))
37 {
38 1x }
39
40 request_parser(request_parser&&) noexcept = default;
41
42 request_parser&
43 operator=(request_parser&&) noexcept = default;
44
45 void
46 1x start()
47 {
48 1x parser::start(false);
49 1x }
50
51 http::static_request const&
52 2x get() const
53 {
54 2x return get_request();
55 }
56 };
57
58 } // namespace detail
59 } // namespace burl
60 } // namespace boost
61
62 #endif
63