-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
query string parameters on GET #189
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Was also looking for this as it's possible in the official fetch impl: https://fetch.spec.whatwg.org/#fetch-blob-example var url = new URL("https://geo.example.org/api"),
params = {lat:35.696233, long:139.570431}
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]))
fetch(url).then(/* … */) Which would save me from doing a cheap parser of my own :) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
const url = 'https://graph.facebook.com/v2.6/me/messages?'
const params = new URLSearchParams({ access_token: 'PAGE_ACCESS_TOKEN' })
fetch(url + params).then(console.log) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hi, i just read that it's no supported by node-fetch. i'm trying to consume an API that only works with GET so y cannot use the POST body. Any ideas of how to solve this?
The text was updated successfully, but these errors were encountered: