summaryrefslogtreecommitdiff
path: root/indra/llmessage/llcorehttputil.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llmessage/llcorehttputil.h')
-rw-r--r--indra/llmessage/llcorehttputil.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/indra/llmessage/llcorehttputil.h b/indra/llmessage/llcorehttputil.h
index e8e5f1b1aa..7d60bfbbaf 100644
--- a/indra/llmessage/llcorehttputil.h
+++ b/indra/llmessage/llcorehttputil.h
@@ -387,8 +387,17 @@ public:
///
void cancelYieldingOperation();
+
static LLCore::HttpStatus getStatusFromLLSD(const LLSD &httpResults);
+ /// Generic Get and post routines for HTTP via coroutines.
+ /// These static methods do all required setup for the GET or POST operation.
+ /// When the operation completes successfully they will put the success message in the log at INFO level,
+ /// If the operation fails the failure message is written to the log at WARN level.
+ ///
+ static void genericHttpGet(const std::string &url, const std::string &success = std::string(), const std::string &failure = std::string());
+ static void genericHttpPost(const std::string &url, const LLSD &postData, const std::string &success, const std::string &failure);
+
private:
static LLSD buildImmediateErrorResult(const LLCore::HttpRequest::ptr_t &request, const std::string &url);
@@ -419,6 +428,9 @@ private:
const std::string & url, LLCore::HttpOptions::ptr_t &options,
LLCore::HttpHeaders::ptr_t &headers, HttpCoroHandler::ptr_t &handler);
+ static void genericGetCoro(LLCoros::self& self, std::string &url, std::string success, std::string failure);
+ static void genericPostCoro(LLCoros::self& self, std::string &url, LLSD postData, std::string success, std::string failure);
+
std::string mAdapterName;
LLCore::HttpRequest::priority_t mPriority;
LLCore::HttpRequest::policy_t mPolicyId;