-
Notifications
You must be signed in to change notification settings - Fork 100
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
lower case method? #58
Comments
Can you give an example where this produces an error? Lowercase HTTP method names are allowed by |
i used .patch method and got 404 bad request error. I dont think i used any polyfills...i just used redaxios out of the box. As soon as i switched back to normal axios.patch it worked great and where redaxios produced a patch request, axios produced a PATCH request and its been working since |
What server/service is producing the 400? |
its a 404... the error already seemed to come before request even was transmitted to the server. |
tbh that really does sound like a polyfill then. Are you able to provide any details about your frontend setup? Are you using a build tool or off-the-shelf setup like Next.js, create-react-app, Vue CLI, etc? |
I am using CRA --template=typescript and i just installed using yarn add
redaxios and that was it pretty much
…On Fri, Oct 9, 2020 at 5:54 PM Jason Miller ***@***.***> wrote:
tbh that really does sound like a polyfill then. Are you able to provide
any details about your frontend setup? Are you using a build tool or
off-the-shelf setup like Next.js, create-react-app, Vue CLI, etc?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#58 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJSWCXOEV5MKUWXTJI4IQTSJ4W3VANCNFSM4SBUOMHA>
.
--
Med venlig hilsen
Bjørn Skovlund Dissing
|
I can confirm the bad request issue. My backend is Node.JS with Express. browserslist (used by
I don't have any additional polyfill configuration in my project. Thus, it is extremely unlikely that the issue is related to polyfill. Why not just simply use the upper case? It is more conforming and just makes more sense. |
i have switched back to standard axios because of this and other suspicious behaviours |
@developit facing this issue as well. I have a repro with Replacing |
Same problem with nextjs v10.1.3 and redaxios 0.4.1 as unique dependency (besides react). According their docs polyfills are only included if browser does not support fetch. Using patch method convert the method to lowercase, but using axios as a function works well.
|
Encountered the same issue. |
Facing the same issue with @developit I can open a pull request with the line of "patch" to "PATCH", I've tried it locally and just changing that line works nicely. |
@semoal that would be good. Cc me when you do. |
when i do redaxios.patch, i can see that its translated to
patch
and notPATCH
which gives problems in terms of 400 bad request.Looking through the redaxios code this seems intentional. Why? According to RFC 7231 page 21. 1) the table uses capital case and doesn't say anywhere that variations of the values in the table are allowed. 2) last sentence on page 20
methods are case sensitive and should be upper case.
Am I missing something here?
The text was updated successfully, but these errors were encountered: