#include "ccf/ds/logger.h"
#include "ccf/ds/nonstd.h"
#include "ccf/rest_verb.h"
#include "host/proxy.h"
#include <cstddef>
#include <cstdint>
#include <curl/curl.h>
#include <curl/multi.h>
#include <memory>
#include <mutex>
#include <optional>
#include <regex>
#include <span>
#include <stdexcept>
#include <uv.h>
Go to the source code of this file.
|
#define | CHECK_CURL_EASY(fn, ...) |
|
#define | CHECK_CURL_EASY_SETOPT(handle, info, arg) CHECK_CURL_EASY(curl_easy_setopt, handle, info, arg) |
|
#define | CHECK_CURL_EASY_GETINFO(handle, info, arg) CHECK_CURL_EASY(curl_easy_getinfo, handle, info, arg) |
|
#define | CHECK_CURL_MULTI(fn, ...) |
|
◆ CHECK_CURL_EASY
#define CHECK_CURL_EASY |
( |
|
fn, |
|
|
|
... |
|
) |
| |
Value: do \
{ \
const auto res = fn(__VA_ARGS__); \
if (res != CURLE_OK) \
{ \
throw std::runtime_error(fmt::format( \
"Error calling " #fn ": {} ({})", res, curl_easy_strerror(res))); \
} \
} while (0)
◆ CHECK_CURL_EASY_GETINFO
#define CHECK_CURL_EASY_GETINFO |
( |
|
handle, |
|
|
|
info, |
|
|
|
arg |
|
) |
| CHECK_CURL_EASY(curl_easy_getinfo, handle, info, arg) |
◆ CHECK_CURL_EASY_SETOPT
#define CHECK_CURL_EASY_SETOPT |
( |
|
handle, |
|
|
|
info, |
|
|
|
arg |
|
) |
| CHECK_CURL_EASY(curl_easy_setopt, handle, info, arg) |
◆ CHECK_CURL_MULTI
#define CHECK_CURL_MULTI |
( |
|
fn, |
|
|
|
... |
|
) |
| |
Value: do \
{ \
const auto res = fn(__VA_ARGS__); \
if (res != CURLM_OK) \
{ \
throw std::runtime_error(fmt::format( \
"Error calling " #fn ": {} ({})", res, curl_multi_strerror(res))); \
} \
} while (0)