I use restangular module to make connections to the spotify API and get search results of Albums and artists.
When i fetch an album or an artist , it is ok. The problem is when i pass params to restangular in order to search for results. restangular converts the symols &
and =
to special characters , and that makes the URL not working
For example i have the below snippet to search for albums/artists:
//I pass : https://api.spotify.com/v1/search?q=album:lo%20artist:lo&type=album,artist
const params = "album:lo+artist:lo&type=album,artist";
Restangular.all(SEARCH_END_POINT).getList({q: params}).then(function(data){
console.log("All ok");
console.log(data[0].name);
}, function(response) {
console.log("Error with status code", response.status);
});
Can somebody tell me how these symbols remain the same &
and =
?