I am trying to pass parameters to a URL which looks like this:
http://www.foobar.com/foo?imageurl=
And I want to pass the parameters such as an image URL which is generated itself by another API, and the link for the image turns out as:
http://www.image.com/?username=unknown&password=unknown
However, when I try to use the URL:
http://www.foobar.com/foo?imageurl=http://www.image.com/?username=unknown&password=unknown
It doesn't work.
I have also tried using encodeURI()
and encodeURIComponent()
on the imageURL, and that too doesn't work.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…