HTTPClient using static IP

Dependencies:   mbed

Committer:
mr_q
Date:
Mon May 30 11:53:37 2011 +0000
Revision:
0:d8f2f7d5f31b
v0.01 Draft

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mr_q 0:d8f2f7d5f31b 1
mr_q 0:d8f2f7d5f31b 2 /*
mr_q 0:d8f2f7d5f31b 3 Copyright (c) 2010 Donatien Garnier (donatiengar [at] gmail [dot] com)
mr_q 0:d8f2f7d5f31b 4
mr_q 0:d8f2f7d5f31b 5 Permission is hereby granted, free of charge, to any person obtaining a copy
mr_q 0:d8f2f7d5f31b 6 of this software and associated documentation files (the "Software"), to deal
mr_q 0:d8f2f7d5f31b 7 in the Software without restriction, including without limitation the rights
mr_q 0:d8f2f7d5f31b 8 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
mr_q 0:d8f2f7d5f31b 9 copies of the Software, and to permit persons to whom the Software is
mr_q 0:d8f2f7d5f31b 10 furnished to do so, subject to the following conditions:
mr_q 0:d8f2f7d5f31b 11
mr_q 0:d8f2f7d5f31b 12 The above copyright notice and this permission notice shall be included in
mr_q 0:d8f2f7d5f31b 13 all copies or substantial portions of the Software.
mr_q 0:d8f2f7d5f31b 14
mr_q 0:d8f2f7d5f31b 15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
mr_q 0:d8f2f7d5f31b 16 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
mr_q 0:d8f2f7d5f31b 17 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
mr_q 0:d8f2f7d5f31b 18 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
mr_q 0:d8f2f7d5f31b 19 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
mr_q 0:d8f2f7d5f31b 20 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
mr_q 0:d8f2f7d5f31b 21 THE SOFTWARE.
mr_q 0:d8f2f7d5f31b 22 */
mr_q 0:d8f2f7d5f31b 23
mr_q 0:d8f2f7d5f31b 24 /** \file
mr_q 0:d8f2f7d5f31b 25 HTTP Client header file
mr_q 0:d8f2f7d5f31b 26 */
mr_q 0:d8f2f7d5f31b 27
mr_q 0:d8f2f7d5f31b 28 #ifndef HTTP_CLIENT_H
mr_q 0:d8f2f7d5f31b 29 #define HTTP_CLIENT_H
mr_q 0:d8f2f7d5f31b 30
mr_q 0:d8f2f7d5f31b 31 class HTTPData;
mr_q 0:d8f2f7d5f31b 32
mr_q 0:d8f2f7d5f31b 33 #include "core/net.h"
mr_q 0:d8f2f7d5f31b 34 #include "api/TCPSocket.h"
mr_q 0:d8f2f7d5f31b 35 #include "api/DNSRequest.h"
mr_q 0:d8f2f7d5f31b 36 #include "HTTPData.h"
mr_q 0:d8f2f7d5f31b 37 #include "mbed.h"
mr_q 0:d8f2f7d5f31b 38
mr_q 0:d8f2f7d5f31b 39 #include <string>
mr_q 0:d8f2f7d5f31b 40 using std::string;
mr_q 0:d8f2f7d5f31b 41
mr_q 0:d8f2f7d5f31b 42 #include <map>
mr_q 0:d8f2f7d5f31b 43 using std::map;
mr_q 0:d8f2f7d5f31b 44
mr_q 0:d8f2f7d5f31b 45 ///HTTP client results
mr_q 0:d8f2f7d5f31b 46 enum HTTPResult
mr_q 0:d8f2f7d5f31b 47 {
mr_q 0:d8f2f7d5f31b 48 HTTP_OK, ///<Success
mr_q 0:d8f2f7d5f31b 49 HTTP_PROCESSING, ///<Processing
mr_q 0:d8f2f7d5f31b 50 HTTP_PARSE, ///<URI Parse error
mr_q 0:d8f2f7d5f31b 51 HTTP_DNS, ///<Could not resolve name
mr_q 0:d8f2f7d5f31b 52 HTTP_PRTCL, ///<Protocol error
mr_q 0:d8f2f7d5f31b 53 HTTP_NOTFOUND, ///<HTTP 404 Error
mr_q 0:d8f2f7d5f31b 54 HTTP_REFUSED, ///<HTTP 403 Error
mr_q 0:d8f2f7d5f31b 55 HTTP_ERROR, ///<HTTP xxx error
mr_q 0:d8f2f7d5f31b 56 HTTP_TIMEOUT, ///<Connection timeout
mr_q 0:d8f2f7d5f31b 57 HTTP_CONN ///<Connection error
mr_q 0:d8f2f7d5f31b 58 };
mr_q 0:d8f2f7d5f31b 59
mr_q 0:d8f2f7d5f31b 60 #include "core/netservice.h"
mr_q 0:d8f2f7d5f31b 61
mr_q 0:d8f2f7d5f31b 62 ///A simple HTTP Client
mr_q 0:d8f2f7d5f31b 63 /**
mr_q 0:d8f2f7d5f31b 64 The HTTPClient is composed of:
mr_q 0:d8f2f7d5f31b 65 - The actual client (HTTPClient)
mr_q 0:d8f2f7d5f31b 66 - Classes that act as a data repository, each of which deriving from the HTTPData class (HTTPText for short text content, HTTPFile for file I/O, HTTPMap for key/value pairs, and HTTPStream for streaming purposes)
mr_q 0:d8f2f7d5f31b 67 */
mr_q 0:d8f2f7d5f31b 68 class HTTPClient : protected NetService
mr_q 0:d8f2f7d5f31b 69 {
mr_q 0:d8f2f7d5f31b 70 public:
mr_q 0:d8f2f7d5f31b 71 ///Instantiates the HTTP client
mr_q 0:d8f2f7d5f31b 72 HTTPClient();
mr_q 0:d8f2f7d5f31b 73 virtual ~HTTPClient();
mr_q 0:d8f2f7d5f31b 74
mr_q 0:d8f2f7d5f31b 75 ///Provides a basic authentification feature (Base64 encoded username and password)
mr_q 0:d8f2f7d5f31b 76 void basicAuth(const char* user, const char* password); //Basic Authentification
mr_q 0:d8f2f7d5f31b 77
mr_q 0:d8f2f7d5f31b 78 //High Level setup functions
mr_q 0:d8f2f7d5f31b 79 ///Executes a GET Request (blocking)
mr_q 0:d8f2f7d5f31b 80 /**
mr_q 0:d8f2f7d5f31b 81 Executes a GET request on the URI uri
mr_q 0:d8f2f7d5f31b 82 @param uri : URI on which to execute the request
mr_q 0:d8f2f7d5f31b 83 @param pDataIn : pointer to an HTTPData instance that will collect the data returned by the request, can be NULL
mr_q 0:d8f2f7d5f31b 84 Blocks until completion
mr_q 0:d8f2f7d5f31b 85 */
mr_q 0:d8f2f7d5f31b 86 HTTPResult get(const char* uri, HTTPData* pDataIn); //Blocking
mr_q 0:d8f2f7d5f31b 87
mr_q 0:d8f2f7d5f31b 88 ///Executes a GET Request (non blocking)
mr_q 0:d8f2f7d5f31b 89 /**
mr_q 0:d8f2f7d5f31b 90 Executes a GET request on the URI uri
mr_q 0:d8f2f7d5f31b 91 @param uri : URI on which to execute the request
mr_q 0:d8f2f7d5f31b 92 @param pDataIn : pointer to an HTTPData instance that will collect the data returned by the request, can be NULL
mr_q 0:d8f2f7d5f31b 93 @param pMethod : callback function
mr_q 0:d8f2f7d5f31b 94 The function returns immediately and calls the callback on completion or error
mr_q 0:d8f2f7d5f31b 95 */
mr_q 0:d8f2f7d5f31b 96 HTTPResult get(const char* uri, HTTPData* pDataIn, void (*pMethod)(HTTPResult)); //Non blocking
mr_q 0:d8f2f7d5f31b 97
mr_q 0:d8f2f7d5f31b 98 ///Executes a GET Request (non blocking)
mr_q 0:d8f2f7d5f31b 99 /**
mr_q 0:d8f2f7d5f31b 100 Executes a GET request on the URI uri
mr_q 0:d8f2f7d5f31b 101 @param uri : URI on which to execute the request
mr_q 0:d8f2f7d5f31b 102 @param pDataIn : pointer to an HTTPData instance that will collect the data returned by the request, can be NULL
mr_q 0:d8f2f7d5f31b 103 @param pItem : instance of class on which to execute the callback method
mr_q 0:d8f2f7d5f31b 104 @param pMethod : callback method
mr_q 0:d8f2f7d5f31b 105 The function returns immediately and calls the callback on completion or error
mr_q 0:d8f2f7d5f31b 106 */
mr_q 0:d8f2f7d5f31b 107 template<class T>
mr_q 0:d8f2f7d5f31b 108 HTTPResult get(const char* uri, HTTPData* pDataIn, T* pItem, void (T::*pMethod)(HTTPResult)) //Non blocking
mr_q 0:d8f2f7d5f31b 109 {
mr_q 0:d8f2f7d5f31b 110 setOnResult(pItem, pMethod);
mr_q 0:d8f2f7d5f31b 111 doGet(uri, pDataIn);
mr_q 0:d8f2f7d5f31b 112 return HTTP_PROCESSING;
mr_q 0:d8f2f7d5f31b 113 }
mr_q 0:d8f2f7d5f31b 114
mr_q 0:d8f2f7d5f31b 115 ///Executes a POST Request (blocking)
mr_q 0:d8f2f7d5f31b 116 /**
mr_q 0:d8f2f7d5f31b 117 Executes a POST request on the URI uri
mr_q 0:d8f2f7d5f31b 118 @param uri : URI on which to execute the request
mr_q 0:d8f2f7d5f31b 119 @param dataOut : a HTTPData instance that contains the data that will be posted
mr_q 0:d8f2f7d5f31b 120 @param pDataIn : pointer to an HTTPData instance that will collect the data returned by the request, can be NULL
mr_q 0:d8f2f7d5f31b 121 Blocks until completion
mr_q 0:d8f2f7d5f31b 122 */
mr_q 0:d8f2f7d5f31b 123 HTTPResult post(const char* uri, const HTTPData& dataOut, HTTPData* pDataIn); //Blocking
mr_q 0:d8f2f7d5f31b 124
mr_q 0:d8f2f7d5f31b 125 ///Executes a POST Request (non blocking)
mr_q 0:d8f2f7d5f31b 126 /**
mr_q 0:d8f2f7d5f31b 127 Executes a POST request on the URI uri
mr_q 0:d8f2f7d5f31b 128 @param uri : URI on which to execute the request
mr_q 0:d8f2f7d5f31b 129 @param dataOut : a HTTPData instance that contains the data that will be posted
mr_q 0:d8f2f7d5f31b 130 @param pDataIn : pointer to an HTTPData instance that will collect the data returned by the request, can be NULL
mr_q 0:d8f2f7d5f31b 131 @param pMethod : callback function
mr_q 0:d8f2f7d5f31b 132 The function returns immediately and calls the callback on completion or error
mr_q 0:d8f2f7d5f31b 133 */
mr_q 0:d8f2f7d5f31b 134 HTTPResult post(const char* uri, const HTTPData& dataOut, HTTPData* pDataIn, void (*pMethod)(HTTPResult)); //Non blocking
mr_q 0:d8f2f7d5f31b 135
mr_q 0:d8f2f7d5f31b 136 ///Executes a POST Request (non blocking)
mr_q 0:d8f2f7d5f31b 137 /**
mr_q 0:d8f2f7d5f31b 138 Executes a POST request on the URI uri
mr_q 0:d8f2f7d5f31b 139 @param uri : URI on which to execute the request
mr_q 0:d8f2f7d5f31b 140 @param dataOut : a HTTPData instance that contains the data that will be posted
mr_q 0:d8f2f7d5f31b 141 @param pDataIn : pointer to an HTTPData instance that will collect the data returned by the request, can be NULL
mr_q 0:d8f2f7d5f31b 142 @param pItem : instance of class on which to execute the callback method
mr_q 0:d8f2f7d5f31b 143 @param pMethod : callback method
mr_q 0:d8f2f7d5f31b 144 The function returns immediately and calls the callback on completion or error
mr_q 0:d8f2f7d5f31b 145 */
mr_q 0:d8f2f7d5f31b 146 template<class T>
mr_q 0:d8f2f7d5f31b 147 HTTPResult post(const char* uri, const HTTPData& dataOut, HTTPData* pDataIn, T* pItem, void (T::*pMethod)(HTTPResult)) //Non blocking
mr_q 0:d8f2f7d5f31b 148 {
mr_q 0:d8f2f7d5f31b 149 setOnResult(pItem, pMethod);
mr_q 0:d8f2f7d5f31b 150 doPost(uri, dataOut, pDataIn);
mr_q 0:d8f2f7d5f31b 151 return HTTP_PROCESSING;
mr_q 0:d8f2f7d5f31b 152 }
mr_q 0:d8f2f7d5f31b 153
mr_q 0:d8f2f7d5f31b 154 ///Executes a GET Request (non blocking)
mr_q 0:d8f2f7d5f31b 155 /**
mr_q 0:d8f2f7d5f31b 156 Executes a GET request on the URI uri
mr_q 0:d8f2f7d5f31b 157 @param uri : URI on which to execute the request
mr_q 0:d8f2f7d5f31b 158 @param pDataIn : pointer to an HTTPData instance that will collect the data returned by the request, can be NULL
mr_q 0:d8f2f7d5f31b 159 The function returns immediately and calls the previously set callback on completion or error
mr_q 0:d8f2f7d5f31b 160 */
mr_q 0:d8f2f7d5f31b 161 void doGet(const char* uri, HTTPData* pDataIn);
mr_q 0:d8f2f7d5f31b 162
mr_q 0:d8f2f7d5f31b 163 ///Executes a POST Request (non blocking)
mr_q 0:d8f2f7d5f31b 164 /**
mr_q 0:d8f2f7d5f31b 165 Executes a POST request on the URI uri
mr_q 0:d8f2f7d5f31b 166 @param uri : URI on which to execute the request
mr_q 0:d8f2f7d5f31b 167 @param dataOut : a HTTPData instance that contains the data that will be posted
mr_q 0:d8f2f7d5f31b 168 @param pDataIn : pointer to an HTTPData instance that will collect the data returned by the request, can be NULL
mr_q 0:d8f2f7d5f31b 169 @param pMethod : callback function
mr_q 0:d8f2f7d5f31b 170 The function returns immediately and calls the previously set callback on completion or error
mr_q 0:d8f2f7d5f31b 171 */
mr_q 0:d8f2f7d5f31b 172 void doPost(const char* uri, const HTTPData& dataOut, HTTPData* pDataIn);
mr_q 0:d8f2f7d5f31b 173
mr_q 0:d8f2f7d5f31b 174 ///Setups the result callback
mr_q 0:d8f2f7d5f31b 175 /**
mr_q 0:d8f2f7d5f31b 176 @param pMethod : callback function
mr_q 0:d8f2f7d5f31b 177 */
mr_q 0:d8f2f7d5f31b 178 void setOnResult( void (*pMethod)(HTTPResult) );
mr_q 0:d8f2f7d5f31b 179
mr_q 0:d8f2f7d5f31b 180 ///Setups the result callback
mr_q 0:d8f2f7d5f31b 181 /**
mr_q 0:d8f2f7d5f31b 182 @param pItem : instance of class on which to execute the callback method
mr_q 0:d8f2f7d5f31b 183 @param pMethod : callback method
mr_q 0:d8f2f7d5f31b 184 */
mr_q 0:d8f2f7d5f31b 185 class CDummy;
mr_q 0:d8f2f7d5f31b 186 template<class T>
mr_q 0:d8f2f7d5f31b 187 void setOnResult( T* pItem, void (T::*pMethod)(HTTPResult) )
mr_q 0:d8f2f7d5f31b 188 {
mr_q 0:d8f2f7d5f31b 189 m_pCb = NULL;
mr_q 0:d8f2f7d5f31b 190 m_pCbItem = (CDummy*) pItem;
mr_q 0:d8f2f7d5f31b 191 m_pCbMeth = (void (CDummy::*)(HTTPResult)) pMethod;
mr_q 0:d8f2f7d5f31b 192 }
mr_q 0:d8f2f7d5f31b 193
mr_q 0:d8f2f7d5f31b 194 ///Setups timeout
mr_q 0:d8f2f7d5f31b 195 /**
mr_q 0:d8f2f7d5f31b 196 @param ms : time of connection inactivity in ms after which the request should timeout
mr_q 0:d8f2f7d5f31b 197 */
mr_q 0:d8f2f7d5f31b 198 void setTimeout(int ms);
mr_q 0:d8f2f7d5f31b 199
mr_q 0:d8f2f7d5f31b 200 virtual void poll(); //Called by NetServices
mr_q 0:d8f2f7d5f31b 201
mr_q 0:d8f2f7d5f31b 202 ///Gets last request's HTTP response code
mr_q 0:d8f2f7d5f31b 203 /**
mr_q 0:d8f2f7d5f31b 204 @return The HTTP response code of the last request
mr_q 0:d8f2f7d5f31b 205 */
mr_q 0:d8f2f7d5f31b 206 int getHTTPResponseCode();
mr_q 0:d8f2f7d5f31b 207
mr_q 0:d8f2f7d5f31b 208 ///Sets a specific request header
mr_q 0:d8f2f7d5f31b 209 void setRequestHeader(const string& header, const string& value);
mr_q 0:d8f2f7d5f31b 210
mr_q 0:d8f2f7d5f31b 211 ///Gets a response header
mr_q 0:d8f2f7d5f31b 212 string& getResponseHeader(const string& header);
mr_q 0:d8f2f7d5f31b 213
mr_q 0:d8f2f7d5f31b 214 ///Clears request headers
mr_q 0:d8f2f7d5f31b 215 void resetRequestHeaders();
mr_q 0:d8f2f7d5f31b 216
mr_q 0:d8f2f7d5f31b 217 protected:
mr_q 0:d8f2f7d5f31b 218 void resetTimeout();
mr_q 0:d8f2f7d5f31b 219
mr_q 0:d8f2f7d5f31b 220 void init();
mr_q 0:d8f2f7d5f31b 221 void close();
mr_q 0:d8f2f7d5f31b 222
mr_q 0:d8f2f7d5f31b 223 void setup(const char* uri, HTTPData* pDataOut, HTTPData* pDataIn); //Setup request, make DNS Req if necessary
mr_q 0:d8f2f7d5f31b 224 void connect(); //Start Connection
mr_q 0:d8f2f7d5f31b 225
mr_q 0:d8f2f7d5f31b 226 int tryRead(); //Read data and try to feed output
mr_q 0:d8f2f7d5f31b 227 void readData(); //Data has been read
mr_q 0:d8f2f7d5f31b 228 void writeData(); //Data has been written & buf is free
mr_q 0:d8f2f7d5f31b 229
mr_q 0:d8f2f7d5f31b 230 void onTCPSocketEvent(TCPSocketEvent e);
mr_q 0:d8f2f7d5f31b 231 void onDNSReply(DNSReply r);
mr_q 0:d8f2f7d5f31b 232 void onResult(HTTPResult r); //Called when exchange completed or on failure
mr_q 0:d8f2f7d5f31b 233 void onTimeout(); //Connection has timed out
mr_q 0:d8f2f7d5f31b 234
mr_q 0:d8f2f7d5f31b 235 private:
mr_q 0:d8f2f7d5f31b 236 HTTPResult blockingProcess(); //Called in blocking mode, calls Net::poll() until return code is available
mr_q 0:d8f2f7d5f31b 237
mr_q 0:d8f2f7d5f31b 238 bool readHeaders(); //Called first when receiving data
mr_q 0:d8f2f7d5f31b 239 bool writeHeaders(); //Called to create req
mr_q 0:d8f2f7d5f31b 240 int readLine(char* str, int maxLen, bool* pIncomplete = NULL);
mr_q 0:d8f2f7d5f31b 241
mr_q 0:d8f2f7d5f31b 242 enum HTTP_METH
mr_q 0:d8f2f7d5f31b 243 {
mr_q 0:d8f2f7d5f31b 244 HTTP_GET,
mr_q 0:d8f2f7d5f31b 245 HTTP_POST,
mr_q 0:d8f2f7d5f31b 246 HTTP_HEAD
mr_q 0:d8f2f7d5f31b 247 };
mr_q 0:d8f2f7d5f31b 248
mr_q 0:d8f2f7d5f31b 249 HTTP_METH m_meth;
mr_q 0:d8f2f7d5f31b 250
mr_q 0:d8f2f7d5f31b 251 CDummy* m_pCbItem;
mr_q 0:d8f2f7d5f31b 252 void (CDummy::*m_pCbMeth)(HTTPResult);
mr_q 0:d8f2f7d5f31b 253
mr_q 0:d8f2f7d5f31b 254 void (*m_pCb)(HTTPResult);
mr_q 0:d8f2f7d5f31b 255
mr_q 0:d8f2f7d5f31b 256 TCPSocket* m_pTCPSocket;
mr_q 0:d8f2f7d5f31b 257 map<string, string> m_reqHeaders;
mr_q 0:d8f2f7d5f31b 258 map<string, string> m_respHeaders;
mr_q 0:d8f2f7d5f31b 259
mr_q 0:d8f2f7d5f31b 260 Timer m_watchdog;
mr_q 0:d8f2f7d5f31b 261 int m_timeout;
mr_q 0:d8f2f7d5f31b 262
mr_q 0:d8f2f7d5f31b 263 DNSRequest* m_pDnsReq;
mr_q 0:d8f2f7d5f31b 264
mr_q 0:d8f2f7d5f31b 265 Host m_server;
mr_q 0:d8f2f7d5f31b 266 string m_path;
mr_q 0:d8f2f7d5f31b 267
mr_q 0:d8f2f7d5f31b 268 bool m_closed;
mr_q 0:d8f2f7d5f31b 269
mr_q 0:d8f2f7d5f31b 270 enum HTTPStep
mr_q 0:d8f2f7d5f31b 271 {
mr_q 0:d8f2f7d5f31b 272 // HTTP_INIT,
mr_q 0:d8f2f7d5f31b 273 HTTP_WRITE_HEADERS,
mr_q 0:d8f2f7d5f31b 274 HTTP_WRITE_DATA,
mr_q 0:d8f2f7d5f31b 275 HTTP_READ_HEADERS,
mr_q 0:d8f2f7d5f31b 276 HTTP_READ_DATA,
mr_q 0:d8f2f7d5f31b 277 HTTP_READ_DATA_INCOMPLETE,
mr_q 0:d8f2f7d5f31b 278 HTTP_DONE,
mr_q 0:d8f2f7d5f31b 279 HTTP_CLOSED
mr_q 0:d8f2f7d5f31b 280 };
mr_q 0:d8f2f7d5f31b 281
mr_q 0:d8f2f7d5f31b 282 HTTPStep m_state;
mr_q 0:d8f2f7d5f31b 283
mr_q 0:d8f2f7d5f31b 284 HTTPData* m_pDataOut;
mr_q 0:d8f2f7d5f31b 285 HTTPData* m_pDataIn;
mr_q 0:d8f2f7d5f31b 286
mr_q 0:d8f2f7d5f31b 287 bool m_dataChunked; //Data is encoded as chunks
mr_q 0:d8f2f7d5f31b 288 int m_dataPos; //Position in data
mr_q 0:d8f2f7d5f31b 289 int m_dataLen; //Data length
mr_q 0:d8f2f7d5f31b 290 char* m_buf;
mr_q 0:d8f2f7d5f31b 291 char* m_pBufRemaining; //Remaining
mr_q 0:d8f2f7d5f31b 292 int m_bufRemainingLen; //Data length in m_pBufRemaining
mr_q 0:d8f2f7d5f31b 293
mr_q 0:d8f2f7d5f31b 294 int m_httpResponseCode;
mr_q 0:d8f2f7d5f31b 295
mr_q 0:d8f2f7d5f31b 296 HTTPResult m_blockingResult; //Result if blocking mode
mr_q 0:d8f2f7d5f31b 297
mr_q 0:d8f2f7d5f31b 298 };
mr_q 0:d8f2f7d5f31b 299
mr_q 0:d8f2f7d5f31b 300 //Including data containers here for more convenience
mr_q 0:d8f2f7d5f31b 301 #include "data/HTTPFile.h"
mr_q 0:d8f2f7d5f31b 302 #include "data/HTTPStream.h"
mr_q 0:d8f2f7d5f31b 303 #include "data/HTTPText.h"
mr_q 0:d8f2f7d5f31b 304 #include "data/HTTPMap.h"
mr_q 0:d8f2f7d5f31b 305
mr_q 0:d8f2f7d5f31b 306 #endif