1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-12 01:53:07 +03:00

add CHUNKED encoding support too http client (#1324)

HTTP Client - fix examples
increase default timeout to 5000ms
This commit is contained in:
Markus Sattler
2015-12-30 19:38:06 +01:00
parent bbaed29b7e
commit cc0037682b
6 changed files with 146 additions and 55 deletions

View File

@ -63,7 +63,7 @@ void loop() {
int httpCode = http.GET();
// httpCode will be negative on error
if(httpCode) {
if(httpCode > 0) {
// HTTP header has been send and Server response header has been handled
USE_SERIAL.printf("[HTTP] GET... code: %d\n", httpCode);

View File

@ -51,7 +51,7 @@ void loop() {
int httpCode = http.GET();
// httpCode will be negative on error
if(httpCode) {
if(httpCode > 0) {
// HTTP header has been send and Server response header has been handled
USE_SERIAL.printf("[HTTP] GET... code: %d\n", httpCode);

View File

@ -48,7 +48,7 @@ void loop() {
//http.begin("192.168.1.12", 80, "/test.html");
int httpCode = http.GET();
if(httpCode) {
if(httpCode > 0) {
USE_SERIAL.printf("[HTTP] GET... code: %d\n", httpCode);
// file found at server

View File

@ -50,7 +50,7 @@ void loop() {
USE_SERIAL.print("[HTTP] GET...\n");
// start connection and send HTTP header
int httpCode = http.GET();
if(httpCode) {
if(httpCode > 0) {
// HTTP header has been send and Server response header has been handled
USE_SERIAL.printf("[HTTP] GET... code: %d\n", httpCode);