0

I am using $location service to set query string in the url like this one :

$location.search('prefix','s/5469b2f5b4292d22522e84e0/ms.files/images/');

But it is showing url like this :

?prefix=s%2F5469b2f5b4292d22522e84e0%2Fms.files%2Fimages%2F

I don't want to encode it and need like this one

?prefix=s/5469b2f5b4292d22522e84e0/ms.files/images/
Rohit
  • 2,987
  • 3
  • 25
  • 50
  • 1
    It's what it's supposed to do and what HTTP specifications tell you to do. GET parameters have to be URL encoded. – Sergiu Paraschiv Jun 12 '15 at 08:53
  • Is there any other way to achieve it ? – Rohit Jun 12 '15 at 08:56
  • No, you'll have to "URL-decode" the value server-side. – Sergiu Paraschiv Jun 12 '15 at 08:58
  • but aws is doing this thing : https://console.aws.amazon.com/s3/home?region=myregion1#&bucket=mybucket&prefix=s/5469b2f5b4292d22522e84e0/ms.files/ i was working in aws admin panel and from there i got this url – Rohit Jun 12 '15 at 08:59
  • It really depends on the server they are using. The standard says `/` should be encoded to `%2F`. Whatever AWS is using does not enforce this rule. Regarding what you could to to make this work: http://stackoverflow.com/questions/22944932/angularjs-resource-how-to-disable-url-entity-encoding – Sergiu Paraschiv Jun 12 '15 at 09:07

0 Answers0