diff --git a/libraries/ESP8266httpClient/examples/BasicHttpClient/BasicHttpClient.ino b/libraries/ESP8266httpClient/examples/BasicHttpClient/BasicHttpClient.ino index 0cdceb975..15526e096 100644 --- a/libraries/ESP8266httpClient/examples/BasicHttpClient/BasicHttpClient.ino +++ b/libraries/ESP8266httpClient/examples/BasicHttpClient/BasicHttpClient.ino @@ -12,7 +12,7 @@ #include -#define USE_SERIAL Serial1 +#define USE_SERIAL Serial ESP8266WiFiMulti WiFiMulti; @@ -59,7 +59,7 @@ void loop() { USE_SERIAL.println(payload); } } else { - USE_SERIAL.print("[HTTP] GET... faild, no connection or no HTTP server\n"); + USE_SERIAL.print("[HTTP] GET... failed, no connection or no HTTP server\n"); } } diff --git a/libraries/ESP8266httpClient/examples/StreamHttpClient/StreamHttpClient.ino b/libraries/ESP8266httpClient/examples/StreamHttpClient/StreamHttpClient.ino index 9b64dab1c..43b6d4d8b 100644 --- a/libraries/ESP8266httpClient/examples/StreamHttpClient/StreamHttpClient.ino +++ b/libraries/ESP8266httpClient/examples/StreamHttpClient/StreamHttpClient.ino @@ -89,7 +89,7 @@ void loop() { } } else { - USE_SERIAL.print("[HTTP] GET... faild, no connection or no HTTP server\n"); + USE_SERIAL.print("[HTTP] GET... failed, no connection or no HTTP server\n"); } } diff --git a/libraries/ESP8266httpClient/examples/reuseConnection/reuseConnection.ino b/libraries/ESP8266httpClient/examples/reuseConnection/reuseConnection.ino index 7179b1f82..4610cb972 100644 --- a/libraries/ESP8266httpClient/examples/reuseConnection/reuseConnection.ino +++ b/libraries/ESP8266httpClient/examples/reuseConnection/reuseConnection.ino @@ -13,7 +13,7 @@ #include -#define USE_SERIAL Serial1 +#define USE_SERIAL Serial ESP8266WiFiMulti WiFiMulti; @@ -54,7 +54,7 @@ void loop() { http.writeToStream(&USE_SERIAL); } } else { - USE_SERIAL.print("[HTTP] GET... faild, no connection or no HTTP server\n"); + USE_SERIAL.print("[HTTP] GET... failed, no connection or no HTTP server\n"); } } diff --git a/libraries/ESP8266httpClient/src/ESP8266httpClient.cpp b/libraries/ESP8266httpClient/src/ESP8266httpClient.cpp index 7e3fd6fec..69becd195 100644 --- a/libraries/ESP8266httpClient/src/ESP8266httpClient.cpp +++ b/libraries/ESP8266httpClient/src/ESP8266httpClient.cpp @@ -99,7 +99,7 @@ void httpClient::begin(String host, uint16_t port, String url, bool https, Strin /** * end - * called after the payload is handeld + * called after the payload is handled */ void httpClient::end(void) { if(connected()) { @@ -176,13 +176,13 @@ int httpClient::sendRequest(const char * type, uint8_t * payload, size_t size) { // send Header if(!sendHeader(type)) { - return HTTPC_ERROR_SEND_HEADER_FAILD; + return HTTPC_ERROR_SEND_HEADER_FAILED; } // send Payload if needed if(payload && size > 0) { if(_tcp->write(&payload[0], size) != size) { - return HTTPC_ERROR_SEND_PAYLOAD_FAILD; + return HTTPC_ERROR_SEND_PAYLOAD_FAILED; } } @@ -200,7 +200,7 @@ int httpClient::getSize(void) { /** * deprecated Note: this is not working with https! - * returns the stram of the tcp connection + * returns the stream of the tcp connection * @return WiFiClient */ WiFiClient & httpClient::getStream(void) { @@ -214,7 +214,7 @@ WiFiClient & httpClient::getStream(void) { } /** - * returns the stram of the tcp connection + * returns the stream of the tcp connection * @return WiFiClient * */ WiFiClient * httpClient::getStreamPtr(void) { @@ -242,7 +242,7 @@ int httpClient::writeToStream(Stream * stream) { return HTTPC_ERROR_NOT_CONNECTED; } - // get lenght of document (is -1 when Server sends no Content-Length header) + // get length of document (is -1 when Server sends no Content-Length header) int len = _size; int bytesWritten = 0; @@ -282,7 +282,7 @@ int httpClient::writeToStream(Stream * stream) { } /** - * return all payload as String (may need lot of ram or trigger out of memmory!) + * return all payload as String (may need lot of ram or trigger out of memory!) * @return String */ String httpClient::getString(void) { @@ -300,8 +300,9 @@ String httpClient::getString(void) { return sstring; } + /** - * adds Headder to the request + * adds Header to the request * @param name * @param value * @param first @@ -443,7 +444,7 @@ bool httpClient::sendHeader(const char * type) { } /** - * reads the respone from the server + * reads the response from the server * @return int http code */ int httpClient::handleHeaderResponse() { diff --git a/libraries/ESP8266httpClient/src/ESP8266httpClient.h b/libraries/ESP8266httpClient/src/ESP8266httpClient.h index 60a765f82..1f3d33bd5 100644 --- a/libraries/ESP8266httpClient/src/ESP8266httpClient.h +++ b/libraries/ESP8266httpClient/src/ESP8266httpClient.h @@ -35,8 +35,8 @@ /// HTTP client errors #define HTTPC_ERROR_CONNECTION_REFUSED (-1) -#define HTTPC_ERROR_SEND_HEADER_FAILD (-2) -#define HTTPC_ERROR_SEND_PAYLOAD_FAILD (-3) +#define HTTPC_ERROR_SEND_HEADER_FAILED (-2) +#define HTTPC_ERROR_SEND_PAYLOAD_FAILED (-3) #define HTTPC_ERROR_NOT_CONNECTED (-4) #define HTTPC_ERROR_CONNECTION_LOST (-5) #define HTTPC_ERROR_NO_STREAM (-6)