fix request resource error

due to form data getting sent instead of JSON