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:
53:fa91a40cecb5
Parent:
52:cea1021a822d
--- a/HTTPClient.cpp	Wed Oct 28 03:47:56 2015 +0000
+++ b/HTTPClient.cpp	Wed Oct 28 18:11:12 2015 +0000
@@ -403,7 +403,7 @@
     send_buf_p = send_buf ; // Reset send buffer ;
 
     const char* meth = (method==HTTP_GET)?"GET":(method==HTTP_POST)?"POST":(method==HTTP_PUT)?"PUT":(method==HTTP_DELETE)?"DELETE":"";
-    snprintf(buf, sizeof(buf), "%s %s HTTP/1.1\r\nHost: %s\r\nConnection: keep-alive\r\n", meth, path, host); //Write request
+    snprintf(buf, sizeof(buf), "%s %s HTTP/1.1\r\nHost: %s\r\nConnection: keep-alive\r\nAccept: */*\r\nAccept-Language: en-us\r\nUser-Agent: curl/7.43.0\r\n", meth, path, host); //Write request
     ret = send(buf);
     if(ret) {
         m_sock.close();