rest: check that the Content-Type is JSON

Change-Id: Ia698461d8c4b6cc5cbc41ebc8dc1012fa63adbd1
Merge "rest: check that the Content-Type is JSON"