4#ifndef WATERLINKEDSONAR_CURL_TRANSPORT_HPP
5#define WATERLINKEDSONAR_CURL_TRANSPORT_HPP
23 std::chrono::milliseconds timeout);
30 Response post(
const std::string& path,
const std::string& json_body,
31 std::optional<std::chrono::milliseconds> timeout_override =
32 std::nullopt)
override;
36 std::unique_ptr<Impl> impl_;
libcurl easy-interface transport: one handle, blocking, not thread-safe.
Definition curl_transport.hpp:17
Response get(const std::string &path) override
Issues a GET request to the given path.
CurlTransport(const CurlTransport &)=delete
CurlTransport(const std::string &ip, std::uint16_t port, std::chrono::milliseconds timeout)
Connects to ip on port; each request times out after timeout.
~CurlTransport() override
Response post(const std::string &path, const std::string &json_body, std::optional< std::chrono::milliseconds > timeout_override=std::nullopt) override
Issues a POST request with a JSON body.
CurlTransport & operator=(const CurlTransport &)=delete
Blocking HTTP transport.
Definition http_transport.hpp:17
Blocking HTTP transport interface for the Sonar 3D-15 API.
Definition http_transport.hpp:19