I have a file served on a localhost URL like this:
Maybe you can use a
HEAD request instead of a regular
GET? That would return all the server headers along with the response status, and without any data beeing sent from the server. If response status is 200 - your file is present on the server, if it's 404 - it is not.