2muchcoffeecom / ngx-restangular

Restangular for Angular 2 and higher versions
https://2muchcoffee.com/ngxrestangular-app-development
MIT License
781 stars 110 forks source link

URL encoding + to %2B not present in encodeUriQuery function #131

Closed BhuvaneshwaranR closed 6 years ago

BhuvaneshwaranR commented 6 years ago

Hi, While using moment date as query param + is converting into space.but as per standard encoding method it should convert + into %2B.

Thanks, Bhuvaneshwaran

rshchpkn commented 6 years ago

Hello @BhuvaneshwaranR, in encodeUriQuery function + symbol doesn't transform, so it will be %2B.

If you mean query params in simple methods (get, post, put, etc.) it uses @angular/http URLSearchParams in version 2.1.0 and @angular/common/http HttpParams in version 2.2.1. In both cases leaving + not encoded is the native behaviour.

If everything said above is not the subject of the issue, then please re-open it with more details (demo, code sample, etc.)

greeny88 commented 6 years ago

Assuming they are talking about https://github.com/angular/angular/issues/11058 is there a way to workaround it using restangular?

BhuvaneshwaranR commented 6 years ago

Hi @greeny88 , Thanks for the input, but i have completed that by converting date into ISO date format(using moment JS) and Please close the ticket @rshchpkn .