Check content_type in request header and only give back json if it's application/json