postmanfile-uri

How to send postman GET request using file url


I am trying to send a GET request through postman using file URI scheme. An example:

file:///absolute/path/to/file.txt

The request works properly in any browser, but postman is failing with message:

Could not get any response

This seems to be like an error connecting to file:///absolute/path/to/file.txt

Is there any way to make postman work with file URIs?


Solution

  • Postman does not support file URIs, because the Chrome App platform does not allow direct access to files.

    It should be easy to start a small HTTP server yourself though.. if you are on Mac/Linux, you can serve files in a directory using Python:

    $ cd /path/to/directory/
    $ python -m SimpleHTTPServer 1234
    

    You can then visit

    http://localhost:1234/filename
    

    which will serve up the file.