Skip to content

Commit 9089448

Browse files
committedNov 25, 2015
fixed typo
1 parent 75fb6e2 commit 9089448

File tree

5 files changed

+17
-16
lines changed

5 files changed

+17
-16
lines changed
 

‎libraries/ESP8266httpClient/examples/BasicHttpClient/BasicHttpClient.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
#include <ESP8266httpClient.h>
1414

15-
#define USE_SERIAL Serial1
15+
#define USE_SERIAL Serial
1616

1717
ESP8266WiFiMulti WiFiMulti;
1818

@@ -59,7 +59,7 @@ void loop() {
5959
USE_SERIAL.println(payload);
6060
}
6161
} else {
62-
USE_SERIAL.print("[HTTP] GET... faild, no connection or no HTTP server\n");
62+
USE_SERIAL.print("[HTTP] GET... failed, no connection or no HTTP server\n");
6363
}
6464
}
6565

‎libraries/ESP8266httpClient/examples/StreamHttpClient/StreamHttpClient.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ void loop() {
8989

9090
}
9191
} else {
92-
USE_SERIAL.print("[HTTP] GET... faild, no connection or no HTTP server\n");
92+
USE_SERIAL.print("[HTTP] GET... failed, no connection or no HTTP server\n");
9393
}
9494
}
9595

‎libraries/ESP8266httpClient/examples/reuseConnection/reuseConnection.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
#include <ESP8266httpClient.h>
1515

16-
#define USE_SERIAL Serial1
16+
#define USE_SERIAL Serial
1717

1818
ESP8266WiFiMulti WiFiMulti;
1919

@@ -54,7 +54,7 @@ void loop() {
5454
http.writeToStream(&USE_SERIAL);
5555
}
5656
} else {
57-
USE_SERIAL.print("[HTTP] GET... faild, no connection or no HTTP server\n");
57+
USE_SERIAL.print("[HTTP] GET... failed, no connection or no HTTP server\n");
5858
}
5959
}
6060

‎libraries/ESP8266httpClient/src/ESP8266httpClient.cpp

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ void httpClient::begin(String host, uint16_t port, String url, bool https, Strin
9999

100100
/**
101101
* end
102-
* called after the payload is handeld
102+
* called after the payload is handled
103103
*/
104104
void httpClient::end(void) {
105105
if(connected()) {
@@ -176,13 +176,13 @@ int httpClient::sendRequest(const char * type, uint8_t * payload, size_t size) {
176176

177177
// send Header
178178
if(!sendHeader(type)) {
179-
return HTTPC_ERROR_SEND_HEADER_FAILD;
179+
return HTTPC_ERROR_SEND_HEADER_FAILED;
180180
}
181181

182182
// send Payload if needed
183183
if(payload && size > 0) {
184184
if(_tcp->write(&payload[0], size) != size) {
185-
return HTTPC_ERROR_SEND_PAYLOAD_FAILD;
185+
return HTTPC_ERROR_SEND_PAYLOAD_FAILED;
186186
}
187187
}
188188

@@ -200,7 +200,7 @@ int httpClient::getSize(void) {
200200

201201
/**
202202
* deprecated Note: this is not working with https!
203-
* returns the stram of the tcp connection
203+
* returns the stream of the tcp connection
204204
* @return WiFiClient
205205
*/
206206
WiFiClient & httpClient::getStream(void) {
@@ -214,7 +214,7 @@ WiFiClient & httpClient::getStream(void) {
214214
}
215215

216216
/**
217-
* returns the stram of the tcp connection
217+
* returns the stream of the tcp connection
218218
* @return WiFiClient *
219219
*/
220220
WiFiClient * httpClient::getStreamPtr(void) {
@@ -242,7 +242,7 @@ int httpClient::writeToStream(Stream * stream) {
242242
return HTTPC_ERROR_NOT_CONNECTED;
243243
}
244244

245-
// get lenght of document (is -1 when Server sends no Content-Length header)
245+
// get length of document (is -1 when Server sends no Content-Length header)
246246
int len = _size;
247247
int bytesWritten = 0;
248248

@@ -282,7 +282,7 @@ int httpClient::writeToStream(Stream * stream) {
282282
}
283283

284284
/**
285-
* return all payload as String (may need lot of ram or trigger out of memmory!)
285+
* return all payload as String (may need lot of ram or trigger out of memory!)
286286
* @return String
287287
*/
288288
String httpClient::getString(void) {
@@ -300,8 +300,9 @@ String httpClient::getString(void) {
300300
return sstring;
301301
}
302302

303+
303304
/**
304-
* adds Headder to the request
305+
* adds Header to the request
305306
* @param name
306307
* @param value
307308
* @param first
@@ -443,7 +444,7 @@ bool httpClient::sendHeader(const char * type) {
443444
}
444445

445446
/**
446-
* reads the respone from the server
447+
* reads the response from the server
447448
* @return int http code
448449
*/
449450
int httpClient::handleHeaderResponse() {

‎libraries/ESP8266httpClient/src/ESP8266httpClient.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535

3636
/// HTTP client errors
3737
#define HTTPC_ERROR_CONNECTION_REFUSED (-1)
38-
#define HTTPC_ERROR_SEND_HEADER_FAILD (-2)
39-
#define HTTPC_ERROR_SEND_PAYLOAD_FAILD (-3)
38+
#define HTTPC_ERROR_SEND_HEADER_FAILED (-2)
39+
#define HTTPC_ERROR_SEND_PAYLOAD_FAILED (-3)
4040
#define HTTPC_ERROR_NOT_CONNECTED (-4)
4141
#define HTTPC_ERROR_CONNECTION_LOST (-5)
4242
#define HTTPC_ERROR_NO_STREAM (-6)

0 commit comments

Comments
 (0)
Please sign in to comment.