diff options
Diffstat (limited to 'linden/indra/llmessage/llhttpclient.h')
-rw-r--r-- | linden/indra/llmessage/llhttpclient.h | 53 |
1 files changed, 42 insertions, 11 deletions
diff --git a/linden/indra/llmessage/llhttpclient.h b/linden/indra/llmessage/llhttpclient.h index bfefc3a..a0c9fac 100644 --- a/linden/indra/llmessage/llhttpclient.h +++ b/linden/indra/llmessage/llhttpclient.h | |||
@@ -17,7 +17,8 @@ | |||
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception | 20 | * online at |
21 | * http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
21 | * | 22 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 23 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 24 | * that you have read and understood your obligations described above, |
@@ -62,28 +63,56 @@ public: | |||
62 | 63 | ||
63 | /** @name non-blocking API */ | 64 | /** @name non-blocking API */ |
64 | //@{ | 65 | //@{ |
65 | static void head(const std::string& url, ResponderPtr, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); | 66 | static void head( |
67 | const std::string& url, | ||
68 | ResponderPtr, | ||
69 | const LLSD& headers = LLSD(), | ||
70 | const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); | ||
66 | static void getByteRange(const std::string& url, S32 offset, S32 bytes, ResponderPtr, const LLSD& headers=LLSD(), const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); | 71 | static void getByteRange(const std::string& url, S32 offset, S32 bytes, ResponderPtr, const LLSD& headers=LLSD(), const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); |
67 | static void get(const std::string& url, ResponderPtr, const LLSD& headers = LLSD(), const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); | 72 | static void get(const std::string& url, ResponderPtr, const LLSD& headers = LLSD(), const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); |
68 | static void get(const std::string& url, const LLSD& query, ResponderPtr, const LLSD& headers = LLSD(), const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); | 73 | static void get(const std::string& url, const LLSD& query, ResponderPtr, const LLSD& headers = LLSD(), const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); |
69 | 74 | ||
70 | static void put(const std::string& url, const LLSD& body, ResponderPtr, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); | 75 | static void put( |
76 | const std::string& url, | ||
77 | const LLSD& body, | ||
78 | ResponderPtr, | ||
79 | const LLSD& headers = LLSD(), | ||
80 | const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); | ||
71 | static void getHeaderOnly(const std::string& url, ResponderPtr, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); | 81 | static void getHeaderOnly(const std::string& url, ResponderPtr, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); |
72 | static void getHeaderOnly(const std::string& url, ResponderPtr, const LLSD& headers, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); | 82 | static void getHeaderOnly(const std::string& url, ResponderPtr, const LLSD& headers, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); |
73 | 83 | ||
74 | static void post(const std::string& url, const LLSD& body, ResponderPtr, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); | 84 | static void post( |
75 | 85 | const std::string& url, | |
86 | const LLSD& body, | ||
87 | ResponderPtr, | ||
88 | const LLSD& headers = LLSD(), | ||
89 | const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); | ||
76 | /** Takes ownership of data and deletes it when sent */ | 90 | /** Takes ownership of data and deletes it when sent */ |
77 | static void postRaw(const std::string& url, const U8* data, S32 size, ResponderPtr responder, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); | 91 | static void postRaw( |
78 | 92 | const std::string& url, | |
79 | static void postFile(const std::string& url, const std::string& filename, ResponderPtr, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); | 93 | const U8* data, |
80 | # | 94 | S32 size, |
81 | static void postFile(const std::string& url, const LLUUID& uuid, | 95 | ResponderPtr responder, |
82 | LLAssetType::EType asset_type, ResponderPtr responder, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); | 96 | const LLSD& headers = LLSD(), |
97 | const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); | ||
98 | static void postFile( | ||
99 | const std::string& url, | ||
100 | const std::string& filename, | ||
101 | ResponderPtr, | ||
102 | const LLSD& headers = LLSD(), | ||
103 | const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); | ||
104 | static void postFile( | ||
105 | const std::string& url, | ||
106 | const LLUUID& uuid, | ||
107 | LLAssetType::EType asset_type, | ||
108 | ResponderPtr responder, | ||
109 | const LLSD& headers = LLSD(), | ||
110 | const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); | ||
83 | 111 | ||
84 | static void del( | 112 | static void del( |
85 | const std::string& url, | 113 | const std::string& url, |
86 | ResponderPtr responder, | 114 | ResponderPtr responder, |
115 | const LLSD& headers = LLSD(), | ||
87 | const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); | 116 | const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); |
88 | ///< sends a DELETE method, but we can't call it delete in c++ | 117 | ///< sends a DELETE method, but we can't call it delete in c++ |
89 | 118 | ||
@@ -93,12 +122,14 @@ public: | |||
93 | * @param url The complete serialized (and escaped) url to get. | 122 | * @param url The complete serialized (and escaped) url to get. |
94 | * @param destination The complete serialized destination url. | 123 | * @param destination The complete serialized destination url. |
95 | * @param responder The responder that will handle the result. | 124 | * @param responder The responder that will handle the result. |
125 | * @param headers A map of key:value headers to pass to the request | ||
96 | * @param timeout The number of seconds to give the server to respond. | 126 | * @param timeout The number of seconds to give the server to respond. |
97 | */ | 127 | */ |
98 | static void move( | 128 | static void move( |
99 | const std::string& url, | 129 | const std::string& url, |
100 | const std::string& destination, | 130 | const std::string& destination, |
101 | ResponderPtr responder, | 131 | ResponderPtr responder, |
132 | const LLSD& headers = LLSD(), | ||
102 | const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); | 133 | const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); |
103 | 134 | ||
104 | //@} | 135 | //@} |