Skip to content

Feature request: Implement Fetch API using polyfill on XHR #447

@niloc132

Description

@niloc132

https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API

As discussed in #78, there are several polyfills that allow web applications to use the Fetch API in browsers that don't support them, but the browsers that HtmlUnit can behave as most (or all?) already support fetch natively.

One option is to implement the api directly by using a polyfill, referencing some appropriately licensed JS so that when the application calls fetch(), HtmlUnit doesn't need to actually have any specific code, just let the polyfill call XmlHttpRequest which is already supported.

This strategy could be used to populate many browser APIs that can be largely implemented using existing features. This feature (or something even simpler) implemented by a project member could also serve as an example for how outside contributors could easily help by finding and hooking up quality polyfills for other yet to be implemented features.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions