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

Adding node-fetch target #180

Merged
merged 1 commit into from Oct 1, 2020

Conversation

jgiovaresco
Copy link
Contributor

@jgiovaresco jgiovaresco commented Sep 29, 2020

@hirenoble is the original author (#154).
I've just resolve conflicts and fix tests that were failing.

@develohpanda noticed that JSON body should be stringified (https://github.com/node-fetch/node-fetch#post-with-json)
And looking at fetch options (https://github.com/node-fetch/node-fetch#fetch-options) I noticed that json attribute does not exist, so I've removed it.

Closes #152

Copy link
Contributor

@develohpanda develohpanda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for sorting this PR out @jgiovaresco! Looks good to me. One comment regarding JSON encoding, similar to #179. Some of the fixtures would change after that as well.

src/targets/node/fetch.js Outdated Show resolved Hide resolved
headers: {'content-type': 'application/json'},
body: {
number: 1,
string: 'f"oo',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'f"oo' 🤣

@hirenoble is the original author (Kong#154).
I've just resolve conflicts and fix tests that were failing.

@develohpanda noticed that JSON body should be stringified (https://github.com/node-fetch/node-fetch#post-with-json)
And looking at fetch options (https://github.com/node-fetch/node-fetch#fetch-options) I noticed that `json` attribute does not exist, so I've removed it.
Copy link
Contributor

@develohpanda develohpanda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicely done 👏

@develohpanda develohpanda merged commit af1e308 into Kong:master Oct 1, 2020
@jgiovaresco jgiovaresco deleted the add-node-fetch-target branch October 1, 2020 20:05
@hirenoble
Copy link
Contributor

@jgiovaresco Thanks a lot for taking care of that! I wasn't noticing any activity on this thread.

develohpanda pushed a commit that referenced this pull request Oct 2, 2020
@hirenoble is the original author (#154).
I've just resolve conflicts and fix tests that were failing.

@develohpanda noticed that JSON body should be stringified (https://github.com/node-fetch/node-fetch#post-with-json)
And looking at fetch options (https://github.com/node-fetch/node-fetch#fetch-options) I noticed that `json` attribute does not exist, so I've removed it.

Co-authored-by: Julien Giovaresco <dev@giovaresco.fr>
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 this pull request may close these issues.

Node request is no longer supported
3 participants