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?
The solution was to set a request header ('Content-Type', 'application/x-www-form-urlencoded') and instead of sending a stringified JSON parameter object, send a parameter string ('f=json&title=a title&description=a description...').
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.