PACS System 0.1.0
PACS DICOM system library
Loading...
Searching...
No Matches
http_client.h File Reference

libcurl-backed HTTPS POST client for ITI-41 transport. More...

#include <kcenon/common/patterns/result.h>
#include <kcenon/pacs/ihe/xds/errors.h>
#include <kcenon/pacs/ihe/xds/http_options.h>
#include <functional>
#include <string>
Include dependency graph for http_client.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  kcenon::pacs::ihe::xds::detail::http_response
 HTTP response captured from a POST call. More...
 
struct  kcenon::pacs::ihe::xds::detail::transport_request
 Optional test hook: replaces the real libcurl transport. More...
 

Namespaces

namespace  kcenon
 
namespace  kcenon::pacs
 
namespace  kcenon::pacs::ihe
 
namespace  kcenon::pacs::ihe::xds
 
namespace  kcenon::pacs::ihe::xds::detail
 

Typedefs

using kcenon::pacs::ihe::xds::detail::transport_override
 

Functions

void kcenon::pacs::ihe::xds::detail::set_http_transport_override (transport_override fn)
 
void kcenon::pacs::ihe::xds::detail::clear_http_transport_override ()
 
kcenon::common::Result< http_response > kcenon::pacs::ihe::xds::detail::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.
 

Detailed Description

libcurl-backed HTTPS POST client for ITI-41 transport.

A thin RAII wrapper over libcurl handles (easy and slist) that POSTs a precomputed request body to a configured endpoint and returns the response body and HTTP status.

This is an internal header.

Definition in file http_client.h.