A HTTP Client library - increase receive buffer size

Dependents:   Fx0Hackson_b Fx0Hackson HTTPClient_HelloWorld HTTPClient_POST ... more

Fork of HTTPClient by Donatien Garnier

Revision:
20:a0201b94b774
Parent:
19:3c7789c521df
Child:
21:87fb5dd782dc
--- a/HTTPClient.cpp	Fri Jan 23 09:55:35 2015 +0000
+++ b/HTTPClient.cpp	Mon Mar 16 11:30:54 2015 +0000
@@ -18,7 +18,7 @@
  */
 
 //Debug is disabled by default
-#if 0
+#if 1
 //Enable debug
 #include <cstdio>
 #define DBG(x, ...) std::printf("[HTTPClient : DBG]"x"\r\n", ##__VA_ARGS__); 
@@ -161,7 +161,8 @@
   DBG("Sending request");
   char buf[CHUNK_SIZE];
   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\n", meth, path, host); //Write request
+  snprintf(buf, sizeof(buf), "%s %s HTTP/1.1\r\nHost: %s:%d\r\n", meth, path, host ,port); //Write request
+  DBG("Request line: buf.");
   ret = send(buf);
   if(ret)
   {