Send mime type as application/json if pertinent.