aboutsummaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorRichard Qin <richard.qin.x@gmail.com>2026-04-11 03:28:01 +0800
committerRichard Qin <richard.qin.x@gmail.com>2026-04-11 03:28:01 +0800
commitd68d4495395cabc10407e088b6781bf7ee5035e1 (patch)
treee9633cfed14cc8f38396971e41434dfabc5034c1 /src/net
parent828b10cc337784444b18e4c178a75f87c771412a (diff)
downloadrwebbrowser-d68d4495395cabc10407e088b6781bf7ee5035e1.tar.gz
rwebbrowser-d68d4495395cabc10407e088b6781bf7ee5035e1.tar.xz
style: apply consistent code formatting and bracing style across the codebase
Diffstat (limited to 'src/net')
-rw-r--r--src/net/http_client.cc13
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() ) {