I am getting the following error .I know I need to escape few chars but is there any better way to do this ?
My path variable has some error
getNearByUsers(latlong) {
return http.get({
host: 'search-vegme-user-7l3rylms73566frh4hwxblekn4.us-east-1.cloudsearch.amazonaws.com',
path: '/2013-01-01/search?q=nikhil&expr.distance=haversin(35.621966,-120.686706,latlong.latitude,latlong.longitude)&sort=distance asc&return=distance,displayname,profileimageurl'
}, function(response) {
// Continuously update stream with data
var body = '';
response.on('data', function(d) {
body += d;
});
response.on('end', function() {
// Data reception is done, do whatever with it!
var parsed = JSON.parse(body);
console.log(parsed);
});
});
}
"errors": [
{
"message": "Request path contains unescaped characters.",
"originalError": {}
}
]