-
Notifications
You must be signed in to change notification settings - Fork 81
patching an entity will not set 'PATCH' as method #81
Comments
This is a big problem because of JakeChampion/fetch#37 ... |
Looks like this has to be fixed outside of fetch, as they are not going to normalize |
restful.js should not rely on fetch normalizing the method names anyway IMO. Just supply the right method names.. |
Agreed — I will try and submit a "patch" for this issue today that uppercases all the method names for consistency. |
👍 (that pun) could just uppercase it here https://github.com/marmelab/restful.js/blob/master/src/model/endpoint.js#L16 |
This addresses marmelab#81 which breaks because fetch does not normalize the lowercase patch method to uppercase. Further, this changes all HTTP method definitions so that they do not rely on normalization of HTTP methods by the fetch dependency.
What do you think of the approach I've taken in #83 ? Instead of forcing all to uppercase, I thought it would be best to just define the methods of the endpoint as uppercase to begin with. |
looks good 👍 |
This addresses marmelab#81 which breaks because fetch does not normalize the lowercase patch method to uppercase. Further, this changes all HTTP method definitions so that they do not rely on normalization of HTTP methods by the fetch dependency.
Should be fixed by 0.9.6 thanks to @opengeek. |
actually a breaking change – isn't it? Does restful.js not follow semver? :\ |
Yes it does but I don't think this is a BC. The restful.js api was not updated. |
What if projects relied on the "broken" patch method? Those will now eventually hit a roadblock. |
I don't believe it's possible to rely on the bug here, so this is not a BC break. AFAIK, patch wasn't working at all since the switch to using |
patch was "working" – it was just sending |
Well, it broke all of my projects using restful.js when the project moved to fetch because "patch" is not a valid method and the browser will not allow it due to CORS pre-flight checks. But perhaps this should increment the minor pre-1.0 version number to indicate the potential additional BC break on this method. I'll leave that to the maintainers to decide. |
but
patch
(lowercase)I don't think that's how it should be.
The text was updated successfully, but these errors were encountered: