Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeout for GET request #98

Open
PyreDev opened this issue Dec 19, 2020 · 1 comment
Open

Timeout for GET request #98

PyreDev opened this issue Dec 19, 2020 · 1 comment

Comments

@PyreDev
Copy link

PyreDev commented Dec 19, 2020

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,

@github-actions
Copy link

Welcome to HTTPSRedirect! Please provide enough info to debug the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant