Added headers checking to ensure json in request bodies