Skip to content

Commit

Permalink
http: Make request writing functions public
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
p12tic committed Dec 14, 2024
1 parent 9e60483 commit 109b041
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/seastar/http/request.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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<char>& out) const;
private:
void add_query_param(std::string_view param);
friend class experimental::connection;
};

Expand Down

0 comments on commit 109b041

Please sign in to comment.