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

A type that can send HTTP requests. More...

#include <transport.h>

Concept definition

template<typename T>
concept kcenon::common::concepts::HttpSender = requires(T t, const interfaces::http_request& request) {
{ t.send(request) };
}
A type that can send HTTP requests.
Definition transport.h:64

Detailed Description

A type that can send HTTP requests.

Types satisfying this concept can send HTTP requests and receive responses. This is the core functionality of an HTTP client.

Example usage:

template<HttpSender H>
void fetch_data(H& client, const interfaces::http_request& req) {
auto result = client.send(req);
if (result.is_ok()) {
// Process response
}
}

Definition at line 64 of file transport.h.