angularjs - $http.post URL is getting trimmed off if URL has "#" -
i'm having 1 rest api: /myapp/fetchdata/user-name/password
. user-name , password changed based on request.
when call above restapi
/myapp/fetchdata/srikanth/abcdef#g123
the request going this:
/myapp/fetchdata/srikanth/abcdef
basically in url text got removed #
character. there way solve?
thanks, srikanth.
in uri #
triggers begins of "fragment", , ends path. fragment specify portion of resource identified path.
when post-ing request client, have escape special characters. request should be:
/myapp/fetchdata/srikanth/abcdef%23g123
there different way escaping urls, encodeuri
or encodeuricomponent
function in js. example, may do:
var request = "/myapp/fetchdata/srikanth/" + encodeuricomponent("abcdef#g123");
then server have decode original request.
but: sure solution send password plain in way?
Comments
Post a Comment