aurelia / fetch-client

An HTTP Client based on the Fetch standard.
MIT License
76 stars 47 forks source link

HTTP methods must be upper case #117

Closed Archelyst closed 5 years ago

Archelyst commented 5 years ago

I'm submitting a bug report

Current behavior: CORS request fails for all methods but GET.

Expected/desired behavior: CORS should work for all methods.

As per RFC-7230 methods are case-sensitive and must be upper case. However, the fetch client uses lower case method names except for GET (where it doesn't specify the method name, so it falls back to the default which is of course upper case). This leads to CORS requests with lower case method names which then don't match the upper case response, ergo the access is denied.

bigopon commented 5 years ago

@Tim-Erwin nice find, would be awesome if you could PR to fix it 😄

Archelyst commented 5 years ago

Already on it :)