Notes posted by webmat
RSS feed
webmat -
February 23, 2013
0 thanks
webmat -
November 5, 2012 - (v3.0.0 - v3.2.8)
0 thanks
Specifying an accept header in your tests
To specify an accept header, you need to pass it in the second hash like this:
get '/url', nil, {'HTTP_ACCEPT' => 'application/json'}
The documentation says everything is uppercased and HTTP_ is appended when necessary, but that wasn’t working for me.