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

Node.js / Fetch - qs isn't supported #201

Closed
p8952 opened this issue Jan 19, 2021 · 2 comments · Fixed by #213
Closed

Node.js / Fetch - qs isn't supported #201

p8952 opened this issue Jan 19, 2021 · 2 comments · Fixed by #213

Comments

@p8952
Copy link

p8952 commented Jan 19, 2021

Code Generation for Node.js / Fetch using node-fetch generates code like this:

const fetch = require('node-fetch');

let url = '<REDACTED>';

let options = {
  method: 'GET',
  qs: {reference: '<REDACTED>'},
  headers: {
    'Content-Type': 'application/json'
  }
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error('error:' + err));

However the qs option is not supported by node-fetch: node-fetch/node-fetch#887

@jsohan
Copy link

jsohan commented Jan 28, 2021

params/query support would be a big help

@erunion
Copy link
Contributor

erunion commented Apr 20, 2021

Fix for this in #213

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

Successfully merging a pull request may close this issue.

3 participants