[TEST] parse response body as json depending on the content-type in our REST tests