Should return true or false if the request or response is of the contenttype specified in is().
Examples that should work if content-type is application/hal+json:
is('json')
is('application/json')
is('application/hal+json')
Only xml and json should be supported for the + syntax.
Bonus feature: would be nice if it supports an array of contenttypes too. If more than 1 are passed, it should return true if any of the contenttypes match.
Should return true or false if the request or response is of the contenttype specified in
is()
.Examples that should work if content-type is
application/hal+json
:is('json')
is('application/json')
is('application/hal+json')
Only
xml
andjson
should be supported for the+
syntax.Bonus feature: would be nice if it supports an array of contenttypes too. If more than 1 are passed, it should return
true
if any of the contenttypes match.