Common System 0.2.0
Common interfaces and patterns for system integration
Loading...
Searching...
No Matches
kcenon::common::concepts::HttpClientLike Concept Reference

A complete HTTP client type satisfying IHttpClient interface. More...

#include <transport.h>

Concept definition

template<typename T>
A type that can check HTTP client availability.
Definition transport.h:84
A complete HTTP client type satisfying IHttpClient interface.
Definition transport.h:109
A type that can send HTTP requests.
Definition transport.h:64

Detailed Description

A complete HTTP client type satisfying IHttpClient interface.

Types satisfying this concept provide full HTTP client functionality including sending requests and availability checking. This concept matches the IHttpClient interface contract.

Example usage:

template<HttpClientLike H>
auto make_request(H& client, const std::string& url) {
if (!client.is_available()) {
return make_error("HTTP client not available");
}
return client.send(req);
}
Result< T > make_error(int code, const std::string &message, const std::string &module="")
Create an error result with code and message.
Definition utilities.h:91

Definition at line 109 of file transport.h.