diff options
Diffstat (limited to 'linden/indra/llmessage/llhttpclient.h')
-rw-r--r-- | linden/indra/llmessage/llhttpclient.h | 50 |
1 files changed, 40 insertions, 10 deletions
diff --git a/linden/indra/llmessage/llhttpclient.h b/linden/indra/llmessage/llhttpclient.h index 50c6f7a..367098f 100644 --- a/linden/indra/llmessage/llhttpclient.h +++ b/linden/indra/llmessage/llhttpclient.h | |||
@@ -62,28 +62,56 @@ public: | |||
62 | 62 | ||
63 | /** @name non-blocking API */ | 63 | /** @name non-blocking API */ |
64 | //@{ | 64 | //@{ |
65 | static void head(const std::string& url, ResponderPtr, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); | 65 | static void head( |
66 | const std::string& url, | ||
67 | ResponderPtr, | ||
68 | const LLSD& headers = LLSD(), | ||
69 | 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); | 70 | 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); | 71 | 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); | 72 | static void get(const std::string& url, const LLSD& query, ResponderPtr, const LLSD& headers = LLSD(), const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); |
69 | 73 | ||
70 | static void put(const std::string& url, const LLSD& body, ResponderPtr, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); | 74 | static void put( |
75 | const std::string& url, | ||
76 | const LLSD& body, | ||
77 | ResponderPtr, | ||
78 | const LLSD& headers = LLSD(), | ||
79 | const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); | ||
71 | static void getHeaderOnly(const std::string& url, ResponderPtr, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); | 80 | 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); | 81 | static void getHeaderOnly(const std::string& url, ResponderPtr, const LLSD& headers, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); |
73 | 82 | ||
74 | static void post(const std::string& url, const LLSD& body, ResponderPtr, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); | 83 | static void post( |
75 | 84 | const std::string& url, | |
85 | const LLSD& body, | ||
86 | ResponderPtr, | ||
87 | const LLSD& headers = LLSD(), | ||
88 | const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); | ||
76 | /** Takes ownership of data and deletes it when sent */ | 89 | /** 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); | 90 | static void postRaw( |
78 | 91 | const std::string& url, | |
79 | static void postFile(const std::string& url, const std::string& filename, ResponderPtr, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); | 92 | const U8* data, |
80 | # | 93 | S32 size, |
81 | static void postFile(const std::string& url, const LLUUID& uuid, | 94 | ResponderPtr responder, |
82 | LLAssetType::EType asset_type, ResponderPtr responder, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); | 95 | const LLSD& headers = LLSD(), |
96 | const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); | ||
97 | static void postFile( | ||
98 | const std::string& url, | ||
99 | const std::string& filename, | ||
100 | ResponderPtr, | ||
101 | const LLSD& headers = LLSD(), | ||
102 | const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); | ||
103 | static void postFile( | ||
104 | const std::string& url, | ||
105 | const LLUUID& uuid, | ||
106 | LLAssetType::EType asset_type, | ||
107 | ResponderPtr responder, | ||
108 | const LLSD& headers = LLSD(), | ||
109 | const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); | ||
83 | 110 | ||
84 | static void del( | 111 | static void del( |
85 | const std::string& url, | 112 | const std::string& url, |
86 | ResponderPtr responder, | 113 | ResponderPtr responder, |
114 | const LLSD& headers = LLSD(), | ||
87 | const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); | 115 | const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); |
88 | ///< sends a DELETE method, but we can't call it delete in c++ | 116 | ///< sends a DELETE method, but we can't call it delete in c++ |
89 | 117 | ||
@@ -93,12 +121,14 @@ public: | |||
93 | * @param url The complete serialized (and escaped) url to get. | 121 | * @param url The complete serialized (and escaped) url to get. |
94 | * @param destination The complete serialized destination url. | 122 | * @param destination The complete serialized destination url. |
95 | * @param responder The responder that will handle the result. | 123 | * @param responder The responder that will handle the result. |
124 | * @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. | 125 | * @param timeout The number of seconds to give the server to respond. |
97 | */ | 126 | */ |
98 | static void move( | 127 | static void move( |
99 | const std::string& url, | 128 | const std::string& url, |
100 | const std::string& destination, | 129 | const std::string& destination, |
101 | ResponderPtr responder, | 130 | ResponderPtr responder, |
131 | const LLSD& headers = LLSD(), | ||
102 | const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); | 132 | const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); |
103 | 133 | ||
104 | //@} | 134 | //@} |