Can't make Fetch API work
See original GitHub issueAs far as I understand, Fetch API is supported but I couldn’t make it working.
On the code like fetch(request)...
I got an error ReferenceError: "fetch" is not defined
.
On the code like window.fetch(request)
it fails with TypeError: Cannot find function fetch in object [object Window]
I use 2.36.0 version with htmlunit-driver and RobotFramework. The code for creating htmlunit driver is the following:
I expect that it will use default browser that is CHROME and it should have a support for Fetch API.
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
javascript - Can't fetch data with fetch API - Stack Overflow
Can't fetch data with fetch API ... I can't get the fetch() API to work. I get the strong feeling I'm doing something...
Read more >How to Use the Fetch API (Correctly) - CODE Magazine
Navigate into the folder Samples-WebAPI and load that folder in Visual Studio Code or Visual Studio 2019. Open the appsettings.json file and ...
Read more >Using the Fetch API - MDN Web Docs
The Fetch API provides a JavaScript interface for accessing and manipulating parts of the protocol, such as requests and responses.
Read more >Why I won't be using Fetch API in my apps - Shahar Talmi
When Fetch API became standard I was thrilled. I will no longer need to use http utility libraries in order to make http...
Read more >Fetch API - The Modern JavaScript Tutorial
Still, it's good to know what fetch can do, so if the need arises, ... will succeed due to keepalive , but subsequent...
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 Free
Top 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
since 2.59 there is finally a workaround based on the polyfill support - check out https://htmlunit.sourceforge.io/webclient.html
@mvillafuertem maybe you meant @rbri instead of @rbi ?
But as a coincidence I faced the same issue. I solved it by using a Polyfill that implements the fetch API based on XMLHttpRequest in the software under test.