Closed therabidbanana closed 11 years ago
Could you add a test before I accept this pull request.
There aren't any tests on the bin script, so not really sure what to go off of. Should I just mock the call and say it passes if it sends an accept header down to the open
, or do you want me to bring in an actual sinatra server to serve both html and json and then have this spec start that sinatra app up and hit it for this one test?
If I understand the problem I think it is a bit of a specialized use case to make a change to Mida for. Mainly because if that change were made it would reduce Mida's default error checking ability. Wouldn't it be better to just configure the correct headers for your api?
I don't agree that it's specialized to send an accept HTML header for a library that will won't be able to do anything if it doesn't receive HTML, unless Mida can handle other content types. How does this reduce error checking ability?
Not sure what you mean about configuring the correct headers for my API, is there some configuration option I missed that would send an accept header?
Was playing with serializing my JSON api to HTML, but wanted to experiment with microdata so that the HTML could still be useful. Since my default content type is not HTML, mida fails to get any data without sending an Accept header.