From 109b041aed39b44ddaf72eb7b9f9d578ba92d50e Mon Sep 17 00:00:00 2001 From: Povilas Kanapickas Date: Sat, 14 Dec 2024 18:15:40 +0200 Subject: [PATCH] http: Make request writing functions public Websocket client connection starts by a plain HTTP request with some websocket-specific headers. Due to this similarity it makes sense to reuse existing HTTP code when implementing websocket client in the future. For that at least request_line() and write_request_headers() are required. These functions are accessible to existing HTTP client code due to friend class experimental::connection being present. --- include/seastar/http/request.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/seastar/http/request.hh b/include/seastar/http/request.hh index d222fb7472..d27604b6a0 100644 --- a/include/seastar/http/request.hh +++ b/include/seastar/http/request.hh @@ -313,10 +313,10 @@ struct request { */ static request make(httpd::operation_type type, sstring host, sstring path); -private: - void add_query_param(std::string_view param); sstring request_line() const; future<> write_request_headers(output_stream& out) const; +private: + void add_query_param(std::string_view param); friend class experimental::connection; };