diff options
author | Christian Goetze <cg@lindenlab.com> | 2008-11-18 21:20:05 +0000 |
---|---|---|
committer | Christian Goetze <cg@lindenlab.com> | 2008-11-18 21:20:05 +0000 |
commit | a86aa7d8b08f326e9422e321467dfed7ffe97a4c (patch) | |
tree | 276f78d91a21356a39becf91e319879b5d6f219b /indra/llmessage/llhttpclient.h | |
parent | ba9cf4aa151950039d4e098b5637a35a204b7f6b (diff) |
QAR-963 svn merge -r101685:101752 svn+ssh://svn.lindenlab.com/svn/linden/branches/rad-chilies/rc05-release-merge
Diffstat (limited to 'indra/llmessage/llhttpclient.h')
-rw-r--r-- | indra/llmessage/llhttpclient.h | 50 |
1 files changed, 40 insertions, 10 deletions
diff --git a/indra/llmessage/llhttpclient.h b/indra/llmessage/llhttpclient.h index af79662be9..6267eb465f 100644 --- a/indra/llmessage/llhttpclient.h +++ b/indra/llmessage/llhttpclient.h @@ -62,28 +62,56 @@ public: /** @name non-blocking API */ //@{ - static void head(const std::string& url, ResponderPtr, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); + static void head( + const std::string& url, + ResponderPtr, + const LLSD& headers = LLSD(), + const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); static void getByteRange(const std::string& url, S32 offset, S32 bytes, ResponderPtr, const LLSD& headers=LLSD(), const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); static void get(const std::string& url, ResponderPtr, const LLSD& headers = LLSD(), const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); static void get(const std::string& url, const LLSD& query, ResponderPtr, const LLSD& headers = LLSD(), const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); - static void put(const std::string& url, const LLSD& body, ResponderPtr, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); + static void put( + const std::string& url, + const LLSD& body, + ResponderPtr, + const LLSD& headers = LLSD(), + const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); static void getHeaderOnly(const std::string& url, ResponderPtr, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); static void getHeaderOnly(const std::string& url, ResponderPtr, const LLSD& headers, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); - static void post(const std::string& url, const LLSD& body, ResponderPtr, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); - + static void post( + const std::string& url, + const LLSD& body, + ResponderPtr, + const LLSD& headers = LLSD(), + const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); /** Takes ownership of data and deletes it when sent */ - static void postRaw(const std::string& url, const U8* data, S32 size, ResponderPtr responder, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); - - static void postFile(const std::string& url, const std::string& filename, ResponderPtr, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); - # - static void postFile(const std::string& url, const LLUUID& uuid, - LLAssetType::EType asset_type, ResponderPtr responder, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); + static void postRaw( + const std::string& url, + const U8* data, + S32 size, + ResponderPtr responder, + const LLSD& headers = LLSD(), + const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); + static void postFile( + const std::string& url, + const std::string& filename, + ResponderPtr, + const LLSD& headers = LLSD(), + const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); + static void postFile( + const std::string& url, + const LLUUID& uuid, + LLAssetType::EType asset_type, + ResponderPtr responder, + const LLSD& headers = LLSD(), + const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); static void del( const std::string& url, ResponderPtr responder, + const LLSD& headers = LLSD(), const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); ///< sends a DELETE method, but we can't call it delete in c++ @@ -93,12 +121,14 @@ public: * @param url The complete serialized (and escaped) url to get. * @param destination The complete serialized destination url. * @param responder The responder that will handle the result. + * @param headers A map of key:value headers to pass to the request * @param timeout The number of seconds to give the server to respond. */ static void move( const std::string& url, const std::string& destination, ResponderPtr responder, + const LLSD& headers = LLSD(), const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); //@} |