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

Respons Timeout #151

Open
im-pro-at opened this issue Feb 17, 2022 · 0 comments
Open

Respons Timeout #151

im-pro-at opened this issue Feb 17, 2022 · 0 comments

Comments

@im-pro-at
Copy link

im-pro-at commented Feb 17, 2022

Is your feature request related to a problem? Please describe.
If a client is slow or does not fetch the result the httpServer.loop() can take a long time to process!
In a lot of situations we will just want to cancel the webrequest instat of waiting ...

Describe the solution you'd like

I would like a possibility to set a timeout for the HTTPResponse like that:

void handleRoot(HTTPRequest * req, HTTPResponse * res)
{
Serial.println("HTTP Handling root call!");
req->discardRequestBody();
res->setTimeout(5); //Set an timeout of 5 Secounds
res->setHeader("Content-Type", "text/html");
res->print(INDEX_HTML);
}

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