diff options
Diffstat (limited to 'indra/llmessage')
-rw-r--r-- | indra/llmessage/llhttpclient.cpp | 9 | ||||
-rw-r--r-- | indra/llmessage/llhttpclient.h | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/indra/llmessage/llhttpclient.cpp b/indra/llmessage/llhttpclient.cpp index 92c309f1bc..a7d187f534 100644 --- a/indra/llmessage/llhttpclient.cpp +++ b/indra/llmessage/llhttpclient.cpp @@ -17,6 +17,7 @@ #include "llsdserialize.h" #include "llvfile.h" #include "llvfs.h" +#include "lluri.h" #include "message.h" #include <curl/curl.h> @@ -263,6 +264,14 @@ void LLHTTPClient::get(const std::string& url, ResponderPtr responder, const F32 request(url, LLURLRequest::HTTP_GET, NULL, responder, timeout); } +void LLHTTPClient::get(const std::string& url, const LLSD& query, ResponderPtr responder, const F32 timeout) +{ + LLURI uri; + + uri = LLURI::buildHTTP(url, LLSD::emptyArray(), query); + get(uri.asString(), responder, timeout); +} + // A simple class for managing data returned from a curl http request. class LLHTTPBuffer { diff --git a/indra/llmessage/llhttpclient.h b/indra/llmessage/llhttpclient.h index 060293c930..f2674ba417 100644 --- a/indra/llmessage/llhttpclient.h +++ b/indra/llmessage/llhttpclient.h @@ -53,6 +53,7 @@ public: typedef boost::intrusive_ptr<Responder> ResponderPtr; static void get(const std::string& url, ResponderPtr, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); + static void get(const std::string& url, const LLSD& query, ResponderPtr, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); static void put(const std::string& url, const LLSD& body, ResponderPtr, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); ///< non-blocking static void post(const std::string& url, const LLSD& body, ResponderPtr, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); |