Skip to content
This repository has been archived by the owner on Dec 12, 2019. It is now read-only.

loading a JSON data file fails if the request includes the ".json" extension #10

Closed
chillpop opened this issue Nov 7, 2014 · 2 comments

Comments

@chillpop
Copy link
Contributor

chillpop commented Nov 7, 2014

If your sample request includes the ".json" extension (e.g. getting a file from an FTP site), then loading just a JSON file as the mock response fails. It instead is looking for ".json.json".

@vokal-isaac
Copy link
Contributor

That's as-designed—the file name is based on the full URL, prepended with the scheme, potentially with parameters tacked on the tail end, and with either .json or .http tacked on the end to indicate whether the mock URL protocol should load it as JSON or as a raw HTTP stream.

@chillpop
Copy link
Contributor Author

chillpop commented Nov 7, 2014

Fair enough. I solved my issue by turning the JSON file into a ".http" file.

@chillpop chillpop closed this as completed Nov 7, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants