mercredi 9 août 2017

How to format URL for an image file in a website directory named with URL escape characters

I have a very unique problem (I think).

Some human (I think), named a website directory "hello%20world". I want to get at the images in that directory by calling:

http://website/images/hello%20world/image.jpg

But, the browser or Curl or Fiddler or Powershell's Invoke-RestMethod translates that to:

http://website/images/hello world/image.jpg

...which is not found.

Other than changing the directory name, what other options do I have to escape the escape characters?




Aucun commentaire:

Enregistrer un commentaire