URL Encoding
See original GitHub issueIs it possible to encode the URL before fire up the request?
e.g:
$scope.user.getList(‘cars’); //would fires users/123/cars.
Let say, the user’s id contains characters like: ~!@#$&*()=:/,;?+'
, and I want to encode before sending. E.g:roy#01
.
Issue Analytics
- State:
- Created 10 years ago
- Comments:11 (4 by maintainers)
Top Results From Across the Web
HTML URL Encoding Reference - W3Schools
Character From Windows‑1252 From UTF‑8
space %20 %20
! %21 %21
" %22 %22
Read more >URL Encode and Decode - Online
Encode to URL-encoded format or decode from it with various advanced options. Our site has an easy to use online tool to convert...
Read more >Percent-encoding - Wikipedia
Percent -encoding, also known as URL encoding, is a method to encode arbitrary data in a Uniform Resource Identifier (URI) using only the...
Read more >URL Decoder/Encoder - meyerweb.com
Input a string of text and encode or decode it as you like. Handy for turning encoded JavaScript URLs from complete gibberish into...
Read more >URL Encoding | Google Maps Platform
All characters to be URL-encoded are encoded using a '%' character and a two-character hex value corresponding to their UTF-8 character. For example,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think this is a bug, and
restangular
should url-encode supplied entity IDs before using them to construct REST urls.You said:
… but this is not comparable, because the argument to
$http
is a URL, whereas the argument torestangular
functions likegetList
is an entity ID. It is correct for angularJS to not url-encode a URL typed argument, as that would result in double-encoding, as you point out. However, it is incorrect for restangular to not URL encode a String value when using it in a URL.Actually, I think the bug I am experiencing is in
ng-admin
, sorry.