sideshowcoder / canned

Server to respond with fake API responses, by using a directory of files for finding out what to say!
213 stars 46 forks source link

Enable canned to consider accept header #81

Closed git-jiby-me closed 8 years ago

git-jiby-me commented 8 years ago

This PR enabled canned to check accept header from request to identify which type (js,json,txt,html) of file to respond with, if multiple file types exists for the same request endpoint.

This PR enables this behaviour

sideshowcoder commented 8 years ago

LGTM! Thanks for the PR, I'm merging this but I can't roll a new release right now, I will do so next week for the time being I guess you could install via github so.

git-jiby-me commented 8 years ago

@sideshowcoder no problems, i am currently using the library locally with the changes, once the new version is up, i will change to use the upstream version. By the way really helpful library, was really helpful in decoupling UI and Backend development and testing.

sideshowcoder commented 8 years ago

Thank you :) Happy to help!

sideshowcoder commented 8 years ago

Actually I just pushed out a version as I realized it is quick enough, so feel free to switch to 0.3.6 on npm.

git-jiby-me commented 8 years ago

@sideshowcoder Cool, very nice, thanks :+1: