Skip to content

Timeout for GET request #98

Description

@PyreDev

Hello,

Thanks for this useful librairy.
I'm trying to the buildin led blinking during a GET request, to then also add a timeout there.
It is used with a google script web app to add some data in a spreadsheet.

I tried the following but it's not working, the code seems totally stopped until the GET request is finished :

client->GET(urltest2, host);
while (!client->available()) {
  for (byte i = 0; i <= 2; i++) {
    delay(50);
    digitalWrite(LED_BUILTIN, LOW);
    delay(50);
    digitalWrite(LED_BUILTIN, HIGH);
  }
}

With that code the GET request is properly sending to google sheet and I have my data updated but the LED never blinks.

I also have tried with :

while (!client->GET(urltest2, host)) {
  for (byte i = 0; i <= 2; i++) {
    delay(50);
    digitalWrite(LED_BUILTIN, LOW);
    delay(50);
    digitalWrite(LED_BUILTIN, HIGH);
  }
}

But the result is the same.

Does someone have a solution or could explain me where I'm wrong ?

regards,

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions