summaryrefslogtreecommitdiff
path: root/indra/newview/llcaphttpsender.cpp
blob: 7928a5004c1d02186c98c68fd95b23129bccbd1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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);
}