summaryrefslogtreecommitdiff
path: root/indra/llmessage/llcorehttputil.cpp
diff options
context:
space:
mode:
authorsimon <simon@lindenlab.com>2023-05-15 23:24:00 +0100
committersimon <simon@lindenlab.com>2023-05-15 23:24:00 +0100
commit2dca661b6a7b40c1dcf94a08f5304df277542597 (patch)
treed2fb6ebed3a83b351746ce74c21943f1881714ca /indra/llmessage/llcorehttputil.cpp
parent74687f270545ededb77f29a7409f64303dcb2e2d (diff)
SL-19676 - more IL control, added Reset Interest List Debug menu command
Diffstat (limited to 'indra/llmessage/llcorehttputil.cpp')
-rw-r--r--indra/llmessage/llcorehttputil.cpp42
1 files changed, 42 insertions, 0 deletions
diff --git a/indra/llmessage/llcorehttputil.cpp b/indra/llmessage/llcorehttputil.cpp
index c8c9280029..6b9ce54c92 100644
--- a/indra/llmessage/llcorehttputil.cpp
+++ b/indra/llmessage/llcorehttputil.cpp
@@ -1336,6 +1336,48 @@ void HttpCoroutineAdapter::trivialPostCoro(std::string url, LLCore::HttpRequest:
}
+/*static*/
+void HttpCoroutineAdapter::callbackHttpDel(const std::string &url, LLCore::HttpRequest::policy_t policyId, completionCallback_t success,
+ completionCallback_t failure)
+{
+ LLCoros::instance().launch("HttpCoroutineAdapter::genericDelCoro",
+ boost::bind(&HttpCoroutineAdapter::trivialDelCoro, url, policyId, success, failure));
+}
+
+/*static*/
+void HttpCoroutineAdapter::trivialDelCoro(std::string url, LLCore::HttpRequest::policy_t policyId, completionCallback_t success,
+ completionCallback_t failure)
+{
+ LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("genericDelCoro", policyId));
+ LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+
+ httpOpts->setWantHeaders(true);
+
+ LL_INFOS("HttpCoroutineAdapter", "genericDelCoro") << "Generic DEL for " << url << LL_ENDL;
+
+ LLSD result = httpAdapter->deleteAndSuspend(httpRequest, url, httpOpts);
+
+ LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
+ LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
+
+ if (!status)
+ {
+ if (failure)
+ {
+ failure(httpResults);
+ }
+ }
+ else
+ {
+ if (success)
+ {
+ success(result);
+ }
+ }
+}
+
+
} // end namespace LLCoreHttpUtil