From 74918ce805de260371ad1be0604ee7369f5f809b Mon Sep 17 00:00:00 2001 From: Mattes D Date: Tue, 16 Aug 2016 11:55:49 +0200 Subject: cUrlClient: Refactored callbacks to use UniquePtr. --- src/HTTP/UrlClient.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/HTTP/UrlClient.h') 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 cCallbacksPtr; /** Used for HTTP status codes. */ @@ -112,7 +113,7 @@ public: static std::pair 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 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 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 Put( const AString & a_URL, - cCallbacks & a_Callbacks, + cCallbacksPtr && a_Callbacks, AStringMap && a_Headers, AString && a_Body, AStringMap && a_Options -- cgit v1.2.3