• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Razakhel / RaZ / 22284637621

22 Feb 2026 10:51AM UTC coverage: 74.25% (-0.2%) from 74.442%
22284637621

push

github

Razakhel
[Network/HttpClient] Added an HTTP client class

- It internally uses the TCP client and can only handle GET requests for now

9 of 42 new or added lines in 3 files covered. (21.43%)

8587 of 11565 relevant lines covered (74.25%)

1709.55 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/include/RaZ/Network/HttpClient.hpp
1
#pragma once
2

3
#ifndef RAZ_HTTPCLIENT_HPP
4
#define RAZ_HTTPCLIENT_HPP
5

6
#include "RaZ/Network/TcpClient.hpp"
7

8
namespace Raz {
9

10
class HttpClient {
11
public:
NEW
12
  HttpClient() = default;
×
NEW
13
  explicit HttpClient(std::string host) { connect(std::move(host)); }
×
14

15
  /// Connects the client to an HTTP server.
16
  /// \param host Host to establish a connection with.
17
  void connect(std::string host);
18
  /// Sends a GET request to the server the client is connected to.
19
  /// \note This operation is blocking and returns only when all data has been sent or if an error occurred.
20
  /// \param resource Data to be sent.
21
  std::string get(std::string_view resource);
22
  /// Disconnects the client from the server.
NEW
23
  void disconnect() { m_tcpClient.disconnect(); }
×
24

25
private:
26
  std::string m_host;
27
  TcpClient m_tcpClient;
28
};
29

30
} // namespace Raz
31

32
#endif //RAZ_HTTPCLIENT_HPP
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc