Reputation: 10401
I'm trying to work around this issue here in which the plus sign is being left as is in the query parameters which get interpreted as spaces on the server instead.
The problem is that I'm using ngxRestangular and so am not clear on how to work around this.
I tried using addFullRequestInterceptor
as below but it caused all of my query params to be double encoded.
this.restangular.withConfig((restConfig) = > {
restConfig.addFullRequestInterceptor((element, operation, path, url, headers, params) => {
for (let param in params) {
params[param] = encodeURIComponent(params[param]);
}
return {params, headers, element}
});
})
I've also tried adding an HttpInterceptor exactly as described in the Angular docs but that doesn't appear to be firing.
How do I go about working around this issue using this library?
Upvotes: 0
Views: 107