-
Notifications
You must be signed in to change notification settings - Fork 111
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
Enhance support for getMethodOverride in getList function #187
Comments
Hey. My Solution is for AngularJs not for Angular. For Angular we actually no longer use Restangular. We added a request interceptor to convert all gets to the override posts
and in app.module.ts
LibString
(edit) Only bug it has now is that if you add an array of [0] it's perceived as empty 🤷♀ didn't have time to fix it. |
To be clear, ngx-Restangular is an angular component, and I believe that the change you made to Angular's Restangular is relevant here (thanks for that!) The fact that your application doesn't use ngx-restangular (which is the Angular version of Restangular) is not really relevant - others do use ngx-restangular, and the fix/change is relevant to them. thanks |
Yeah, I understand, but as I said my pull request is on the AngularJS version. Hope they will implement it for you in the Angular version |
The ability to perform GET-as-POST using the overrideMethods functionality of restangular is very useful; however it's only implemented partially.
One of the common use cases with GET as POST is to have a payload that is too large to be passed in as part of the URL's GET querystring. Using POST instead allows the request to bypass these restrictions, and the need to change settings on servers such as Nginx to support what might ab absurdly long URL.
This issue was identified and corrected by @SamanthaAdrichem some time ago - but was (for whatever reason) never merged into mgonto's Restangular branch.
The fix is referenced in a PR here:
https://github.com/SamanthaAdrichem/restangular/commit/cc03340b0be428ea9c0f75bf34eb453743b7fb0d
and in a ticket here: mgonto/restangular#1329
Adding in the functionality would allow GET-as-POST to also send the Payload in the POST body, instead of in the querystring.
The text was updated successfully, but these errors were encountered: