You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
When defining a resource, if you do not have the HTTP method in uppercase (POST vs post) it doesn't work properly but doesn't throw any errors letting you know of a problem.
If I change 'POST' to 'post' a couple things happen.
1.) Any params not defined in the paramDefaults object seem to be ignored completely.
2.) All params are only ever sent as a URL query string.
Since case matters, I think a change should be made in Angular to auto uppercase the HTTP method or throw an error to let the developer know of a problem. At the very least, if no changes is going to be made, the docs should explain this.
The text was updated successfully, but these errors were encountered:
Although the docs mention the valid methods, Angular does not throw any errors if an invalid method like 'post' or 'ABC' is used. It seems that there should be validation there.
Without explicitly mentioning that the method must be uppercase it is easy to make the assumption that 'POST' and 'post' are the same. Especially considering that jQuery allows either and many people will have used jQuery prior to Angular.
When defining a resource, if you do not have the HTTP method in uppercase (POST vs post) it doesn't work properly but doesn't throw any errors letting you know of a problem.
Here is an example resource definition:
If I change 'POST' to 'post' a couple things happen.
1.) Any params not defined in the paramDefaults object seem to be ignored completely.
2.) All params are only ever sent as a URL query string.
Since case matters, I think a change should be made in Angular to auto uppercase the HTTP method or throw an error to let the developer know of a problem. At the very least, if no changes is going to be made, the docs should explain this.
The text was updated successfully, but these errors were encountered: