Fork of the working HTTPClient adaptation using CyaSSL. This version adds a derivation of HTTPText called HTTPJson to emit JSON text properly. Additionally, the URL parser has defines that permit longer URLs to be utilized.

Dependencies:   mbedTLSLibrary

Dependents:   SalesforceInterface df-2014-heroku-thermostat-k64f SalesforceInterface

Fork of HTTPClient by wolf SSL

This is a fork of the working HTTPS/SSL library that contains two extensions:

- HTTPJson - a derivation of HTTPText for emitting JSON strings specifically. No JSON parsing/checking is accomplished - HTTPJson simply sets the right Content-Type for HTTP(S).

- Expanded internal buffers for longer URLs. This is set in HTTPClient.cpp and is tunable.

Revision:
3:5aef7584de4b
Parent:
2:75f5b83238af
Child:
4:c071b05ac026
--- a/HTTPClient.cpp	Thu Apr 26 14:19:25 2012 +0000
+++ b/HTTPClient.cpp	Thu Apr 26 14:23:15 2012 +0000
@@ -454,15 +454,18 @@
   return OK;
 
   connerr:
+  {
     socket::close(m_sock);
     ERR("Connection error (%d)", ret);
-  return NET_CONN;
-
+    return NET_CONN;
+  }
+  
   prtclerr:
+  {
     socket::close(m_sock);
     ERR("Protocol error");
-  return NET_PROTOCOL;
-
+    return NET_PROTOCOL;
+  }
 }
 
 int HTTPClient::recv(char* buf, size_t minLen, size_t maxLen, size_t* pReadLen) //0 on success, err code on failure