2#ifndef CPP_HTTPLIB_CONNECTION_HPP_INCLUDED
3#define CPP_HTTPLIB_CONNECTION_HPP_INCLUDED
6#include "cpp_restapi_export.h"
11 class [[deprecated(
"Use createCppHttplibConnection() from <cpp_restapi/create_cpp-httplib_connection.hpp>")]] CPP_RESTAPI_EXPORT
Connection:
public ThreadedConnection
14 Connection(
const std::string& address,
const std::map<std::string, std::string>& headerEntries);
Definition cpp-httplib_connection.hpp:12
std::unique_ptr< ISseConnection > subscribe(const std::string &request, EventCallback callback) override
Subscribe to an SSE endpoint.
Connection & operator=(const Connection &)=delete
Response fetchPage(const std::string &request) override
Connection(const std::string &address, const std::map< std::string, std::string > &headerEntries)
Connection(const Connection &)=delete
BaseConnection subclass that implements fetch(url, cb) via a background std::thread.
Definition threaded_connection.hpp:25
Definition cpp-httplib_connection.hpp:10
std::function< void(const SseEvent &)> EventCallback
Definition iconnection.hpp:41
HTTP response containing body, raw headers and the HTTP status code.
Definition iconnection.hpp:26