Interval between connection and fetch
See original GitHub issueHello, I am trying to fetch html from a PHP website but the website show a “Querying Server Data…” text during 0.5s before showing the informations I want to fetch So I need to put an interval delay between “connection” and fetching data from the website
How can I do this ?
Example Code
fetch("https://games.ludosoft.net/sourcebans/index.php", {delay: 500})
.then((res) => res.text())
.then((body) => {
...
});
Expected behavior, if applicable
The fetch() call will return the data delay
(500 here) ms after accessing the website to give him time to load correct data
Your Environment
software | version |
---|---|
node-fetch | 2.6.1 |
node | 14.15.3 |
npm | 6.14.9 |
Operating System | Windows 10 Family, 20H2, x64 |
Additional context/Screenshots
Here is a GIF of what happen when loading the page
Issue Analytics
- State:
- Created 2 years ago
- Comments:8
Top Results From Across the Web
Using set interval and fetch in a function - Stack Overflow
I made the function and the fetch works, but i don't know how to set interval in the same function, without having to...
Read more >How to Timeout a fetch() Request - Dmitri Pavlutin
By default a fetch() request timeouts at the time setup by the browser. In Chrome, for example, this setting equals 300 seconds. That's...
Read more >SQL BETWEEN Command to fetch records from a range
Query using different time along with date like records between 9 to 18 hours of a particular date , all records with time...
Read more >Pool Should Have Option to Always Validate on Fetch - General
Since the Pool is created with the default settings, there will always be at least 1 connection in the pool, with a validationInterval...
Read more >MySQL Connection Handling and Scaling
In this post we describe MySQL connections, user threads, and scaling. We hope that an increased understanding of how MySQL works will help ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I don’t know. this is beyond our scope. Better ask this kind of question on Stackoverflow one alternative is to use a headless browser that renders the website with javascript. but that is more tech heavy.
you would need some xml parser
Thank you very much !