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

The RunKit example is outdated #1072

Closed
2 tasks done
Eomm opened this issue Feb 17, 2020 · 5 comments
Closed
2 tasks done

The RunKit example is outdated #1072

Eomm opened this issue Feb 17, 2020 · 5 comments

Comments

@Eomm
Copy link

Eomm commented Feb 17, 2020

Describe the bug

The runkit example is not updated for got v10:
https://npm.runkit.com/got

Actual behavior

(await got(ISS, { json: true })).body.iss_position;

TypeError: The GET method cannot be used with a body

The code should be updated with:

(await got(ISS, { responseType: 'json' })).body.iss_position;

I didn't find where this example is stored in this repo, I suppose it is not.

Checklist

  • I have read the documentation.
  • I have tried my code with the latest version of Node.js and Got.
@sindresorhus
Copy link
Owner

We don't have any control over that example as it's made by npm, but it seems like we can override it: https://blog.runkit.com/2015/10/28/npm-plus-runkit/

@szmarczak szmarczak changed the title Runkit example outdated The RunKit example is outdated Apr 1, 2020
@Giotino Giotino mentioned this issue May 12, 2020
1 task
@szmarczak
Copy link
Collaborator

Fixed in #1253 48bbb36

@szmarczak
Copy link
Collaborator

Unfortunately it still doesn't have any effect:

image

@Giotino
Copy link
Collaborator

Giotino commented May 16, 2020

Maybe it has to be in files...
But this repo is doing as we did https://github.com/anpur/node-npm-template

@szmarczak
Copy link
Collaborator

Let's wait a while a let's see. Maybe it should be moved to root directory, idk.

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

4 participants