A HTTP Client for the mbed networking libraries, with PUT method

Fork of HTTPClient by Donatien Garnier

Revision:
14:0463c8425d73
Parent:
12:89d09a6db00a
--- a/HTTPClient.h	Sun Aug 05 16:12:10 2012 +0000
+++ b/HTTPClient.h	Tue Aug 14 11:54:13 2012 +0000
@@ -102,6 +102,16 @@
   */
   HTTPResult post(const char* url, const IHTTPDataOut& dataOut, IHTTPDataIn* pDataIn, int timeout = HTTP_CLIENT_DEFAULT_TIMEOUT); //Blocking
   
+  /** Execute a PUT request on the url
+  Blocks until completion
+  @param url : url on which to execute the request
+  @param dataOut : a IHTTPDataOut instance that contains the data that will be posted
+  @param pDataIn : pointer to an IHTTPDataIn instance that will collect the data returned by the request, can be NULL
+  @param timeout waiting timeout in ms (osWaitForever for blocking function, not recommended)
+  @return 0 on success, HTTP error (<0) on failure
+  */
+  HTTPResult put(const char* url, const IHTTPDataOut& dataOut, IHTTPDataIn* pDataIn, int timeout = HTTP_CLIENT_DEFAULT_TIMEOUT); //Blocking
+  
   /** Get last request's HTTP response code
   @return The HTTP response code of the last request
   */
@@ -112,7 +122,8 @@
   {
     HTTP_GET,
     HTTP_POST,
-    HTTP_HEAD
+    HTTP_HEAD,
+    HTTP_PUT
   };
 
   HTTPResult connect(const char* url, HTTP_METH method, IHTTPDataOut* pDataOut, IHTTPDataIn* pDataIn, int timeout); //Execute request