summaryrefslogtreecommitdiff
path: root/indra/llmessage/llcorehttputil.h
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2015-06-08 17:29:01 -0700
committerRider Linden <rider@lindenlab.com>2015-06-08 17:29:01 -0700
commitcf4fec954ca46a139465144ccc3888b8fc7d41da (patch)
treee985921e60f39913f6a20c8eb2b16e8f9fb968b6 /indra/llmessage/llcorehttputil.h
parentce2fc7d775d313a7dfe528b9c09a1d03ad077b50 (diff)
Added a way to pass a policy Id to the coroadapter.
Changed language, appearance, and maturity to conform to use the adapter rather than the SDHandler
Diffstat (limited to 'indra/llmessage/llcorehttputil.h')
-rw-r--r--indra/llmessage/llcorehttputil.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/indra/llmessage/llcorehttputil.h b/indra/llmessage/llcorehttputil.h
index e6c9d2463c..e98399c985 100644
--- a/indra/llmessage/llcorehttputil.h
+++ b/indra/llmessage/llcorehttputil.h
@@ -427,10 +427,18 @@ public:
/// should match this form.
/// @sa callbackHttpGet
/// @sa callbackHttpPost
- typedef boost::function<void (const LLSD &)> completionCallback_t;
+ typedef boost::function<void(const LLSD &)> completionCallback_t;
- static void callbackHttpGet(const std::string &url, completionCallback_t success = NULL, completionCallback_t failure = NULL);
- static void callbackHttpPost(const std::string &url, const LLSD &postData, completionCallback_t success = NULL, completionCallback_t failure = NULL);
+ static void callbackHttpGet(const std::string &url, LLCore::HttpRequest::policy_t policyId, completionCallback_t success = NULL, completionCallback_t failure = NULL);
+ static void callbackHttpGet(const std::string &url, completionCallback_t success = NULL, completionCallback_t failure = NULL)
+ {
+ callbackHttpGet(url, LLCore::HttpRequest::DEFAULT_POLICY_ID, success, failure);
+ }
+ static void callbackHttpPost(const std::string &url, LLCore::HttpRequest::policy_t policyId, const LLSD &postData, completionCallback_t success = NULL, completionCallback_t failure = NULL);
+ static void callbackHttpPost(const std::string &url, const LLSD &postData, completionCallback_t success = NULL, completionCallback_t failure = NULL)
+ {
+ callbackHttpPost(url, LLCore::HttpRequest::DEFAULT_POLICY_ID, postData, success, failure);
+ }
/// Generic Get and post routines for HTTP via coroutines.
/// These static methods do all required setup for the GET or POST operation.
@@ -471,8 +479,8 @@ private:
const std::string & url, LLCore::HttpOptions::ptr_t &options,
LLCore::HttpHeaders::ptr_t &headers, HttpCoroHandler::ptr_t &handler);
- static void trivialGetCoro(LLCoros::self& self, std::string url, completionCallback_t success, completionCallback_t failure);
- static void trivialPostCoro(LLCoros::self& self, std::string url, LLSD postData, completionCallback_t success, completionCallback_t failure);
+ static void trivialGetCoro(LLCoros::self& self, std::string url, LLCore::HttpRequest::policy_t policyId, completionCallback_t success, completionCallback_t failure);
+ static void trivialPostCoro(LLCoros::self& self, std::string url, LLCore::HttpRequest::policy_t policyId, LLSD postData, completionCallback_t success, completionCallback_t failure);
void checkDefaultHeaders(LLCore::HttpHeaders::ptr_t &headers);