2muchcoffeecom / ngx-restangular

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

Impossible to set URL encoding strategy #123

Open kotmatpockuh opened 6 years ago

kotmatpockuh commented 6 years ago
function encodeUriQuery(val, pctEncodeSpaces?) {
      return encodeURIComponent(val).replace(/%40/gi, '@').replace(/%3A/gi, ':').replace(/%24/g, '$').replace(/%2C/gi, ',').replace(/%20/g, (pctEncodeSpaces ? '%20' : '+'));
    }

it's impossible to specify anywhere: whether I want to EncodeSpaces or not

greeny88 commented 6 years ago

I'm trying to figure this out as well. @kotmatpockuh did you figure anything out? I tried adding an HttpInterceptor provider to see if I can handle the encoding there but that doesn't appear to be firing.