GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add polyfill/support for Request · Issue #90 · developit/unfetch

Add polyfill/support for Request #90

New issue
Copy link
New issue
Copy link
Open
Open
Add polyfill/support for Request#90
Copy link
Labels
enhancementhelp wanted
Milestone
5.0

Description

@maslowivan
maslowivan
opened on Sep 14, 2018
Issue body actions

If I use Request, I also can set headers, method, etc and work with it.
https://developer.mozilla.org/en-US/docs/Web/API/Request

Reacted by Dheeraj V

Activity

  1. developit commented on Sep 17, 2018

    @developit
    developit
    on Sep 17, 2018
    Owner
    More actions

    I was originally against this since it's impossible to do in 500b, but I think we need a solution. Perhaps shipping the JS Modules build with { fetch, Request, Response, Headers, AbortController } as exports would promote correct usage.

    Reacted by Phillip Lanclos, Dennis and Grzegorz Rozdzialik
  2. developit
    added
    enhancement
    help wanted
    on Sep 17, 2018
  3. developit
    added this to the 5.0 milestone on Sep 29, 2020
  4. Gelio commented on Jan 21, 2022

    @Gelio
    Gelio
    on Jan 21, 2022
    More actions

    My use case was trying to use isomorphic-unfetch in jest tests running in Node. Since fetch was not globally set, isomorphic-unfetch used the one from node-fetch and fetching was working fine. The problem appeared I hit new Request(...) in my tests. Request was not globally available in Node, which threw an error.

    I ended up polyfilling those globally-available fetch-related symbols using the method suggested in https://github.com/node-fetch/node-fetch#providing-global-access in my jest-setup.js.

    I'm sharing just in case someone is also looking for a solution how to get those globals to work in jest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementhelp wanted

    Projects

    No projects

      Milestone

      • 5.0No due date

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.