PACS System 0.1.0
PACS DICOM system library
Loading...
Searching...
No Matches
http_client.h
Go to the documentation of this file.
1// BSD 3-Clause License
2// Copyright (c) 2021-2025, 🍀☀🌕🌥 🌊
3// See the LICENSE file in the project root for full license information.
4
16#pragma once
17
18#include <kcenon/common/patterns/result.h>
21
22#include <functional>
23#include <string>
24
26
36 long status_code{0};
37 std::string content_type;
38 std::string body;
39};
40
50 std::string url;
51 std::string content_type;
52 std::string soap_action;
53 std::string body;
54 bool verify_peer{true};
55};
56
58 std::function<kcenon::common::Result<http_response>(const transport_request&)>;
59
62
71 const http_options& opts, const std::string& content_type,
72 const std::string& body);
73
74} // namespace kcenon::pacs::ihe::xds::detail
Typed error codes for IHE XDS.b actors (ITI-41 and siblings)
std::string content_type
Transport configuration for IHE XDS.b actors.
std::function< kcenon::common::Result< http_response >(const transport_request &)> transport_override
Definition http_client.h:57
kcenon::common::Result< http_response > http_post(const http_options &opts, const std::string &content_type, const std::string &body)
POST body to opts.endpoint with the given Content-Type.
void set_http_transport_override(transport_override fn)
HTTP response captured from a POST call.
Definition http_client.h:35
Optional test hook: replaces the real libcurl transport.
Definition http_client.h:49
HTTPS transport options for the Document Source actor.