Notes posted by webmat
RSS feed
0 thanks

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.