summaryrefslogtreecommitdiff
path: root/indra/llmessage/llcorehttputil.h
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2015-07-30 16:13:56 -0700
committerRider Linden <rider@lindenlab.com>2015-07-30 16:13:56 -0700
commit96d04a050b4eee3fc0e0728043d5aa960d06eb9e (patch)
tree43ee9ebd7b89f5e492bf1ffa013467211b61f07a /indra/llmessage/llcorehttputil.h
parent6e448739ab8a43b7832525337b0ddba35f622a65 (diff)
Added patchAndYield to httputil adapter
Converted All AISv3 commands (except copyLibrary) to coro model.
Diffstat (limited to 'indra/llmessage/llcorehttputil.h')
-rw-r--r--indra/llmessage/llcorehttputil.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/indra/llmessage/llcorehttputil.h b/indra/llmessage/llcorehttputil.h
index 999fd5f90b..8fe2354d6b 100644
--- a/indra/llmessage/llcorehttputil.h
+++ b/indra/llmessage/llcorehttputil.h
@@ -456,6 +456,24 @@ public:
LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()),
LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders()));
+
+ /// Execute a Post transaction on the supplied URL and yield execution of
+ /// the coroutine until a result is available.
+ ///
+ /// @Note: the request's smart pointer is passed by value so that it will
+ /// not be deallocated during the yield.
+ LLSD patchAndYield(LLCore::HttpRequest::ptr_t request,
+ const std::string & url, const LLSD & body,
+ LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()),
+ LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders()));
+ LLSD patchAndYield(LLCore::HttpRequest::ptr_t &request,
+ const std::string & url, const LLSD & body,
+ LLCore::HttpHeaders::ptr_t &headers)
+ {
+ return patchAndYield(request, url, body,
+ LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), headers);
+ }
+
///
void cancelYieldingOperation();
@@ -518,6 +536,11 @@ private:
const std::string & url, LLCore::HttpOptions::ptr_t &options,
LLCore::HttpHeaders::ptr_t &headers, HttpCoroHandler::ptr_t &handler);
+ LLSD patchAndYield_(LLCore::HttpRequest::ptr_t &request,
+ const std::string & url, const LLSD & body,
+ LLCore::HttpOptions::ptr_t &options, LLCore::HttpHeaders::ptr_t &headers,
+ HttpCoroHandler::ptr_t &handler);
+
static void trivialGetCoro(std::string url, LLCore::HttpRequest::policy_t policyId, completionCallback_t success, completionCallback_t failure);
static void trivialPostCoro(std::string url, LLCore::HttpRequest::policy_t policyId, LLSD postData, completionCallback_t success, completionCallback_t failure);