summaryrefslogtreecommitdiff
path: root/indra/llmessage/llhttpclient.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llmessage/llhttpclient.cpp')
-rw-r--r--indra/llmessage/llhttpclient.cpp64
1 files changed, 48 insertions, 16 deletions
diff --git a/indra/llmessage/llhttpclient.cpp b/indra/llmessage/llhttpclient.cpp
index 618d99dc48..9c716cf42b 100644
--- a/indra/llmessage/llhttpclient.cpp
+++ b/indra/llmessage/llhttpclient.cpp
@@ -1,4 +1,4 @@
- /**
+/**
* @file llhttpclient.cpp
* @brief Implementation of classes for making HTTP requests.
*
@@ -310,9 +310,13 @@ void LLHTTPClient::getByteRange(
request(url,LLURLRequest::HTTP_GET, NULL, responder, timeout, headers);
}
-void LLHTTPClient::head(const std::string& url, ResponderPtr responder, const F32 timeout)
+void LLHTTPClient::head(
+ const std::string& url,
+ ResponderPtr responder,
+ const LLSD& headers,
+ const F32 timeout)
{
- request(url, LLURLRequest::HTTP_HEAD, NULL, responder, timeout);
+ request(url, LLURLRequest::HTTP_HEAD, NULL, responder, timeout, headers);
}
void LLHTTPClient::get(const std::string& url, ResponderPtr responder, const LLSD& headers, const F32 timeout)
@@ -423,39 +427,66 @@ LLSD LLHTTPClient::blockingGet(const std::string& url)
return response;
}
-void LLHTTPClient::put(const std::string& url, const LLSD& body, ResponderPtr responder, const F32 timeout)
+void LLHTTPClient::put(
+ const std::string& url,
+ const LLSD& body,
+ ResponderPtr responder,
+ const LLSD& headers,
+ const F32 timeout)
{
- request(url, LLURLRequest::HTTP_PUT, new LLSDInjector(body), responder, timeout);
+ request(url, LLURLRequest::HTTP_PUT, new LLSDInjector(body), responder, timeout, headers);
}
-void LLHTTPClient::post(const std::string& url, const LLSD& body, ResponderPtr responder, const F32 timeout)
+void LLHTTPClient::post(
+ const std::string& url,
+ const LLSD& body,
+ ResponderPtr responder,
+ const LLSD& headers,
+ const F32 timeout)
{
- request(url, LLURLRequest::HTTP_POST, new LLSDInjector(body), responder, timeout);
+ request(url, LLURLRequest::HTTP_POST, new LLSDInjector(body), responder, timeout, headers);
}
-void LLHTTPClient::postRaw(const std::string& url, const U8* data, S32 size, ResponderPtr responder, const F32 timeout)
+void LLHTTPClient::postRaw(
+ const std::string& url,
+ const U8* data,
+ S32 size,
+ ResponderPtr responder,
+ const LLSD& headers,
+ const F32 timeout)
{
- request(url, LLURLRequest::HTTP_POST, new RawInjector(data, size), responder, timeout);
+ request(url, LLURLRequest::HTTP_POST, new RawInjector(data, size), responder, timeout, headers);
}
-void LLHTTPClient::postFile(const std::string& url, const std::string& filename, ResponderPtr responder, const F32 timeout)
+void LLHTTPClient::postFile(
+ const std::string& url,
+ const std::string& filename,
+ ResponderPtr responder,
+ const LLSD& headers,
+ const F32 timeout)
{
- request(url, LLURLRequest::HTTP_POST, new FileInjector(filename), responder, timeout);
+ request(url, LLURLRequest::HTTP_POST, new FileInjector(filename), responder, timeout, headers);
}
-void LLHTTPClient::postFile(const std::string& url, const LLUUID& uuid,
- LLAssetType::EType asset_type, ResponderPtr responder, const F32 timeout)
+void LLHTTPClient::postFile(
+ const std::string& url,
+ const LLUUID& uuid,
+ LLAssetType::EType asset_type,
+ ResponderPtr responder,
+ const LLSD& headers,
+ const F32 timeout)
{
- request(url, LLURLRequest::HTTP_POST, new VFileInjector(uuid, asset_type), responder, timeout);
+ request(url, LLURLRequest::HTTP_POST, new VFileInjector(uuid, asset_type), responder, timeout, headers);
}
// static
void LLHTTPClient::del(
const std::string& url,
ResponderPtr responder,
+ const LLSD& headers,
const F32 timeout)
{
- request(url, LLURLRequest::HTTP_DELETE, NULL, responder, timeout);
+ request(url, LLURLRequest::HTTP_DELETE, NULL, responder, timeout, headers);
}
// static
@@ -463,9 +494,10 @@ void LLHTTPClient::move(
const std::string& url,
const std::string& destination,
ResponderPtr responder,
+ const LLSD& hdrs,
const F32 timeout)
{
- LLSD headers;
+ LLSD headers = hdrs;
headers["Destination"] = destination;
request(url, LLURLRequest::HTTP_MOVE, NULL, responder, timeout, headers);
}