aboutsummaryrefslogtreecommitdiff
path: root/ricochet/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
commit86f0162f5556e25ce6a5b9b1327ff7ef2800d5c1 (patch)
tree07443f08d7984106812671123cfb6490b6e27524 /ricochet/src/net
parent168504eab3727bd028db9c8b9e377571ae601ac5 (diff)
downloadrcc-project-86f0162f5556e25ce6a5b9b1327ff7ef2800d5c1.tar.gz
rcc-project-86f0162f5556e25ce6a5b9b1327ff7ef2800d5c1.tar.xz
style: apply consistent code formatting and bracing style across the codebase
Diffstat (limited to 'ricochet/src/net')
-rw-r--r--ricochet/src/net/http_client.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/ricochet/src/net/http_client.cc b/ricochet/src/net/http_client.cc
index 256c1f2..d45de40 100644
--- a/ricochet/src/net/http_client.cc
+++ b/ricochet/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() ) {