diff options
| author | Richard Qin <richard.qin.x@gmail.com> | 2026-04-11 03:28:01 +0800 |
|---|---|---|
| committer | Richard Qin <richard.qin.x@gmail.com> | 2026-04-11 03:28:01 +0800 |
| commit | d68d4495395cabc10407e088b6781bf7ee5035e1 (patch) | |
| tree | e9633cfed14cc8f38396971e41434dfabc5034c1 /src/net/http_client.cc | |
| parent | 828b10cc337784444b18e4c178a75f87c771412a (diff) | |
| download | rwebbrowser-d68d4495395cabc10407e088b6781bf7ee5035e1.tar.gz rwebbrowser-d68d4495395cabc10407e088b6781bf7ee5035e1.tar.xz | |
style: apply consistent code formatting and bracing style across the codebase
Diffstat (limited to 'src/net/http_client.cc')
| -rw-r--r-- | src/net/http_client.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/net/http_client.cc b/src/net/http_client.cc index 256c1f2..d45de40 100644 --- a/src/net/http_client.cc +++ b/src/net/http_client.cc @@ -59,7 +59,8 @@ std::expected<ParsedUrl, std::string> parse_url( std::string_view url ) } } // namespace -std::expected<HttpResponse, std::string> HttpClient::fetch( std::string_view url ) const // NOLINT(readability-convert-member-functions-to-static) +std::expected<HttpResponse, std::string> HttpClient::fetch( // NOLINT(readability-convert-member-functions-to-static) + std::string_view url ) const { auto parsed_url = parse_url( url ); if ( !parsed_url.has_value() ) { @@ -75,11 +76,11 @@ std::expected<HttpResponse, std::string> HttpClient::fetch( std::string_view url socket.connect( server_addr ); const std::string request = std::format( "GET {} HTTP/1.1\r\n" - "Host: {}\r\n" - "User-Agent: Ricochet/0.1.0\r\n" - "Connection: close\r\n\r\n", - path, - host ); + "Host: {}\r\n" + "User-Agent: Ricochet/0.1.0\r\n" + "Connection: close\r\n\r\n", + path, + host ); size_t bytes_written = 0; while ( bytes_written < request.size() ) { |
