I've been doing some work with the API and I'm trying to update the location information of a computer. I can successfully make the appropriate request using XML, but I'm unable to do the same with JSON.
Setting Content-Type to "application/json" results in getting a response with the following message:
"Unsupported Media Type,
The server is refusing to service the request because the entity of the request is in a format not supported by the requested resource for the requested method"
Is the API unable to handle JSON puts/posts or is there something I'm doing wrong?
For reference I'm making the request in objective-c using the ASIHTTPRequest class. here is the JSON I'm sending:
{
"computer":{
"general": {"id":265},
"location":{"room":"IT Room"}
}
}