Beispiel fuer Verwendung der HTTP Methoden (GET, POST, PUT, DELETE)
Dependencies: EthernetInterface mbed-rtos mbed
Fork of Sample_HTTPClient by
Diff: HTTPClient/HTTPClient.cpp
- Revision:
- 2:c9e058ee6f87
- Parent:
- 1:2e29a33cd918
diff -r 2e29a33cd918 -r c9e058ee6f87 HTTPClient/HTTPClient.cpp --- a/HTTPClient/HTTPClient.cpp Sat Jan 17 14:11:01 2015 +0000 +++ b/HTTPClient/HTTPClient.cpp Mon Jan 19 10:39:52 2015 +0000 @@ -360,13 +360,13 @@ buf[crlfPos] = '\0'; - char key[32]; + char key[36]; char value[MAXLEN_VALUE]; - key[31] = '\0'; + key[35] = '\0'; value[MAXLEN_VALUE - 1] = '\0'; - int n = sscanf(buf, "%35[^:]: %156[^\r\n]", key, value); + int n = sscanf(buf, "%35[^:]: %119[^\r\n]", key, value); if ( n == 2 ) { DBG("Read header : %s: %s", key, value); if( !strcmp(key, "Content-Length") ) {