Set content-type json for xhr requests