arduino-libraries / ArduinoHttpClient

Arduino HTTP Client library
282 stars 170 forks source link

GET response successful = 0? #35

Closed koulombus closed 6 years ago

koulombus commented 6 years ago

After a successful GET request I get response 0. 0 is normally false and 1 = true. Way 0 on a successful request??

  if (http.get(somePage)) {
       next with response
  } else {
      get not successful
  }
sandeepmistry commented 6 years ago

From https://github.com/arduino-libraries/ArduinoHttpClient/blob/master/src/HttpClient.h#L12

static const int HTTP_SUCCESS =0;

Zero is currently successful for this lib.