summaryrefslogtreecommitdiffstats
path: root/src/HTTP/UrlClient.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/HTTP/UrlClient.h')
-rw-r--r--src/HTTP/UrlClient.h29
1 files changed, 15 insertions, 14 deletions
diff --git a/src/HTTP/UrlClient.h b/src/HTTP/UrlClient.h
index aaff60a87..a73f22521 100644
--- a/src/HTTP/UrlClient.h
+++ b/src/HTTP/UrlClient.h
@@ -9,6 +9,7 @@ Options that can be set via the Options parameter to the cUrlClient calls:
"OwnCert": The client certificate to use, if requested by the server. Any string that can be parsed by cX509Cert.
"OwnPrivKey": The private key appropriate for OwnCert. Any string that can be parsed by cCryptoKey.
"OwnPrivKeyPassword": The password for OwnPrivKey. If not present or empty, no password is assumed.
+"TrustedRootCAs": The trusted root CA certificates (\n-delimited concatenated PEM format) to be used for peer cert verification. If not present, peer cert is not verified.
Behavior:
- If a redirect is received, and redirection is allowed, the redirection is reported via OnRedirecting() callback
@@ -116,16 +117,16 @@ public:
cCallbacksPtr && a_Callbacks,
AStringMap && a_Headers,
const AString & a_Body,
- AStringMap && a_Options
+ const AStringMap & a_Options
);
/** Alias for Request("GET", ...) */
static std::pair<bool, AString> Get(
const AString & a_URL,
cCallbacksPtr && a_Callbacks,
- AStringMap && a_Headers = AStringMap(),
- const AString & a_Body = AString(),
- AStringMap && a_Options = AStringMap()
+ AStringMap && a_Headers = {},
+ const AString & a_Body = {},
+ const AStringMap & a_Options = {}
);
/** Alias for Request("POST", ...) */
@@ -134,7 +135,7 @@ public:
cCallbacksPtr && a_Callbacks,
AStringMap && a_Headers,
const AString & a_Body,
- AStringMap && a_Options
+ const AStringMap & a_Options = {}
);
/** Alias for Request("PUT", ...) */
@@ -143,7 +144,7 @@ public:
cCallbacksPtr && a_Callbacks,
AStringMap && a_Headers,
const AString & a_Body,
- AStringMap && a_Options
+ const AStringMap & a_Options = {}
);
/** The method will run a thread blocking HTTP request. Any error handling
@@ -153,17 +154,17 @@ public:
static std::pair<bool, AString> BlockingRequest(
const AString & a_Method,
const AString & a_URL,
- AStringMap && a_Headers = AStringMap(),
- const AString & a_Body = AString(),
- AStringMap && a_Options = AStringMap()
+ AStringMap && a_Headers = {},
+ const AString & a_Body = {},
+ const AStringMap & a_Options = {}
);
/** Alias for BlockingRequest("GET", ...) */
static std::pair<bool, AString> BlockingGet(
const AString & a_URL,
- AStringMap a_Headers = AStringMap(),
- const AString & a_Body = AString(),
- AStringMap a_Options = AStringMap()
+ AStringMap a_Headers = {},
+ const AString & a_Body = {},
+ const AStringMap & a_Options = {}
);
/** Alias for BlockingRequest("POST", ...) */
@@ -171,7 +172,7 @@ public:
const AString & a_URL,
AStringMap && a_Headers,
const AString & a_Body,
- AStringMap && a_Options
+ const AStringMap & a_Options = {}
);
/** Alias for BlockingRequest("PUT", ...) */
@@ -179,7 +180,7 @@ public:
const AString & a_URL,
AStringMap && a_Headers,
const AString & a_Body,
- AStringMap && a_Options
+ const AStringMap & a_Options = {}
);
};