summaryrefslogtreecommitdiff
path: root/indra/newview/llcaphttpsender.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llcaphttpsender.cpp')
-rw-r--r--indra/newview/llcaphttpsender.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/indra/newview/llcaphttpsender.cpp b/indra/newview/llcaphttpsender.cpp
new file mode 100644
index 0000000000..7928a5004c
--- /dev/null
+++ b/indra/newview/llcaphttpsender.cpp
@@ -0,0 +1,30 @@
+/**
+ * @file llcaphttpsender.cpp
+ * @brief Abstracts details of sending messages via UntrustedMessage cap.
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "linden_common.h"
+#include "llcaphttpsender.h"
+
+LLCapHTTPSender::LLCapHTTPSender(const std::string& cap) :
+ mCap(cap)
+{
+}
+
+//virtual
+void LLCapHTTPSender::send(const LLHost& host, const char* message,
+ const LLSD& body,
+ LLHTTPClient::ResponderPtr response) const
+{
+ llinfos << "LLCapHTTPSender::send: message " << message
+ << " to host " << host << llendl;
+ LLSD llsd;
+ llsd["message"] = message;
+ llsd["body"] = body;
+ LLHTTPClient::post(mCap, llsd, response);
+}