Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

lynxtaa
Copy link
Contributor

@lynxtaa lynxtaa commented Apr 25, 2022

Purpose

The purpose is to follow Fetch Spec

Changes

As per spec:
To normalize a method, if it is a byte-case-insensitive match for DELETE, GET, HEAD, OPTIONS, POST, or PUT, byte-uppercase it.


  • I updated readme
  • I added unit test(s)

@jimmywarting
Copy link
Collaborator

Could you also create a test case for this?

@lynxtaa
Copy link
Contributor Author

lynxtaa commented Apr 27, 2022

Could you also create a test case for this?

I've tried but I'm not sure how can I check if requested method was uppercased or not. In tests res.method is undefined. Could you help me with this?

@lynxtaa
Copy link
Contributor Author

lynxtaa commented Apr 27, 2022

Added tests

Copy link
Member

@LinusU LinusU left a comment

Choose a reason for hiding this comment

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

Neat! 👍

@jimmywarting jimmywarting merged commit 004b3ac into node-fetch:main Apr 28, 2022
@github-actions
Copy link

🎉 This PR is included in version 3.2.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

@jimmywarting
Copy link
Collaborator

thank you @lynxtaa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

non-standard HTTP methods are not uppercased by Chrome
3 participants