25#include <unordered_map>
28#include <seastar/core/sstring.hh>
29#include <seastar/core/iostream.hh>
30#include <seastar/http/url.hh>
36output_stream<char> make_http_chunked_output_stream(output_stream<char>& out);
40output_stream<char> make_http_content_length_output_stream(output_stream<char>& out,
size_t total_len,
size_t& bytes_written);
46SEASTAR_MODULE_EXPORT_BEGIN
51 std::unordered_map<sstring, sstring> params;
53 const sstring& path(
const sstring& key)
const {
54 return params.at(key);
57 [[deprecated(
"Use request::get_path_param() instead.")]]
58 sstring operator[](
const sstring& key)
const {
59 return params.at(key).substr(1);
62 const sstring& at(
const sstring& key)
const {
66 sstring get_decoded_param(
const sstring& key)
const {
67 auto res = params.find(key);
68 if (res == params.end()) {
71 auto raw_path_param = res->second.substr(1);
72 auto decoded_path_param = sstring{};
73 auto ok = seastar::http::internal::path_decode(raw_path_param, decoded_path_param);
77 return decoded_path_param;
80 bool exists(
const sstring& key)
const {
81 return params.find(key) != params.end();
84 void set(
const sstring& key,
const sstring& value) {
95 GET, POST, PUT, DELETE, HEAD, OPTIONS, TRACE, CONNECT, PATCH, NUM_OPERATION
103operation_type str2type(
const sstring& type);
110sstring type2str(operation_type type);
114SEASTAR_MODULE_EXPORT_END
Seastar API namespace.
Definition: abort_on_ebadf.hh:26