diff options
author | Mattes D <github@xoft.cz> | 2023-05-10 00:03:15 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2023-05-19 16:25:12 +0200 |
commit | 77f3cfbba80d4cef603fc644a7f3848d5249b039 (patch) | |
tree | 2196a3e6a08e724cb25ad76986fc25e3e577e1a7 /src/HTTP/UrlClient.h | |
parent | MojangAPI: Removed an unused TLS root CA. (diff) | |
download | cuberite-77f3cfbba80d4cef603fc644a7f3848d5249b039.tar cuberite-77f3cfbba80d4cef603fc644a7f3848d5249b039.tar.gz cuberite-77f3cfbba80d4cef603fc644a7f3848d5249b039.tar.bz2 cuberite-77f3cfbba80d4cef603fc644a7f3848d5249b039.tar.lz cuberite-77f3cfbba80d4cef603fc644a7f3848d5249b039.tar.xz cuberite-77f3cfbba80d4cef603fc644a7f3848d5249b039.tar.zst cuberite-77f3cfbba80d4cef603fc644a7f3848d5249b039.zip |
Diffstat (limited to '')
-rw-r--r-- | src/HTTP/UrlClient.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/HTTP/UrlClient.h b/src/HTTP/UrlClient.h index a73f22521..6de18672a 100644 --- a/src/HTTP/UrlClient.h +++ b/src/HTTP/UrlClient.h @@ -87,7 +87,7 @@ public: for such a response; instead, the redirect is silently attempted. */ virtual void OnRedirecting(const AString & a_NewLocation) {} }; - using cCallbacksPtr = std::unique_ptr<cCallbacks>; + using cCallbacksPtr = std::shared_ptr<cCallbacks>; /** Used for HTTP status codes. */ @@ -147,10 +147,9 @@ public: const AStringMap & a_Options = {} ); - /** The method will run a thread blocking HTTP request. Any error handling - is done inside the functions. Check the LOG or stdout for any occurring - errors. Other parameters are the same as for the regular request method. - The return value is if the request was successful and the response. */ + /** Sends a generic request and block until a response is received or an error occurs. + The first returned value specifies whether the response was received successfully. + If successful, the second value provides the actual response data. */ static std::pair<bool, AString> BlockingRequest( const AString & a_Method, const AString & a_URL, |