I'm trying to edit a Portal item through the REST interface. When the request is submitted, I get a 302 response, then a 200 response with the item update HTML page as the response body. I was expecting a JSON response with the result of the update request (item ID and success or failure). The code is on an intranet, but I attached an XMLHttpRequest code snippet. Am I doing something wrong?