summaryrefslogtreecommitdiffstats
path: root/src/HTTP/UrlClient.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2016-08-16 11:55:49 +0200
committerMattes D <github@xoft.cz>2016-08-22 23:44:37 +0200
commit74918ce805de260371ad1be0604ee7369f5f809b (patch)
tree26218e8053606d920b16796b517dc4f030042b65 /src/HTTP/UrlClient.h
parentcTCPLink supports TLS out of the box. (diff)
downloadcuberite-74918ce805de260371ad1be0604ee7369f5f809b.tar
cuberite-74918ce805de260371ad1be0604ee7369f5f809b.tar.gz
cuberite-74918ce805de260371ad1be0604ee7369f5f809b.tar.bz2
cuberite-74918ce805de260371ad1be0604ee7369f5f809b.tar.lz
cuberite-74918ce805de260371ad1be0604ee7369f5f809b.tar.xz
cuberite-74918ce805de260371ad1be0604ee7369f5f809b.tar.zst
cuberite-74918ce805de260371ad1be0604ee7369f5f809b.zip
Diffstat (limited to '')
-rw-r--r--src/HTTP/UrlClient.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/HTTP/UrlClient.h b/src/HTTP/UrlClient.h
index 652cc76f7..ac772235e 100644
--- a/src/HTTP/UrlClient.h
+++ b/src/HTTP/UrlClient.h
@@ -86,6 +86,7 @@ public:
for such a response; instead, the redirect is silently attempted. */
virtual void OnRedirecting(const AString & a_NewLocation) {}
};
+ typedef UniquePtr<cCallbacks> cCallbacksPtr;
/** Used for HTTP status codes. */
@@ -112,7 +113,7 @@ public:
static std::pair<bool, AString> Request(
const AString & a_Method,
const AString & a_URL,
- cCallbacks & a_Callbacks,
+ cCallbacksPtr && a_Callbacks,
AStringMap && a_Headers,
AString && a_Body,
AStringMap && a_Options
@@ -121,7 +122,7 @@ public:
/** Alias for Request("GET", ...) */
static std::pair<bool, AString> Get(
const AString & a_URL,
- cCallbacks & a_Callbacks,
+ cCallbacksPtr && a_Callbacks,
AStringMap a_Headers = AStringMap(),
AString a_Body = AString(),
AStringMap a_Options = AStringMap()
@@ -130,7 +131,7 @@ public:
/** Alias for Request("POST", ...) */
static std::pair<bool, AString> Post(
const AString & a_URL,
- cCallbacks & a_Callbacks,
+ cCallbacksPtr && a_Callbacks,
AStringMap && a_Headers,
AString && a_Body,
AStringMap && a_Options
@@ -139,7 +140,7 @@ public:
/** Alias for Request("PUT", ...) */
static std::pair<bool, AString> Put(
const AString & a_URL,
- cCallbacks & a_Callbacks,
+ cCallbacksPtr && a_Callbacks,
AStringMap && a_Headers,
AString && a_Body,
AStringMap && a_Options