diff options
author | Rider Linden <rider@lindenlab.com> | 2015-06-25 15:47:56 -0700 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2015-06-25 15:47:56 -0700 |
commit | 08ef748cba55d5d950b224710c8592e94fcce5c7 (patch) | |
tree | d0fb8d60987b70fcd77efb34f9df6dfca013ccae /indra/llmessage/llcorehttputil.h | |
parent | 97033975510d0514821f943287d91708eefa9c92 (diff) |
Added file upload interface to core HTTP utils.
Diffstat (limited to 'indra/llmessage/llcorehttputil.h')
-rw-r--r-- | indra/llmessage/llcorehttputil.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/indra/llmessage/llcorehttputil.h b/indra/llmessage/llcorehttputil.h index e98399c985..71f95dd6e4 100644 --- a/indra/llmessage/llcorehttputil.h +++ b/indra/llmessage/llcorehttputil.h @@ -43,6 +43,8 @@ #include "llevents.h" #include "llcoros.h" #include "lleventcoro.h" +#include "llassettype.h" +#include "lluuid.h" /// /// The base llcorehttp library implements many HTTP idioms @@ -355,6 +357,34 @@ public: LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions(), false), headers); } + LLSD postFileAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request, + const std::string & url, std::string fileName, + LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions(), false), + LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders(), false)); + + LLSD postFileAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t &request, + const std::string & url, std::string fileName, + LLCore::HttpHeaders::ptr_t &headers) + { + return postFileAndYield(self, request, url, fileName, + LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions(), false), headers); + } + + + LLSD HttpCoroutineAdapter::postFileAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request, + const std::string & url, LLUUID assetId, LLAssetType::EType assetType, + LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions(), false), + LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders(), false)); + + LLSD HttpCoroutineAdapter::postFileAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request, + const std::string & url, LLUUID assetId, LLAssetType::EType assetType, + LLCore::HttpHeaders::ptr_t &headers) + { + return postFileAndYield(self, request, url, assetId, assetType, + LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions(), false), headers); + } + + /// Execute a Put transaction on the supplied URL and yield execution of /// the coroutine until a result is available. /// |