I added an "Accept: */*" header to the request and this seems to have
fixed it. For anyone wanting to PUT to a RESTful Spring MVC service,
this is what's working for me:
var uriString : String = "
http://localhost:8080/ ***whatever your
path is***
var uri : URI = new URI( uriString )
var variables : Array = [
{name: 'field1', value: field1TI.text},
{name: 'field2', value : field2TI.text},
{name: '_method', value : 'PUT'}]
var request : HttpRequest = new Post( variables )
request.addHeader( "Accept", "*/*" )
request.addHeader( "Content-Type", "application/x-www-form-
urlencoded" )
request.addHeader( "Cache-Control", "no-cache" )
request.contentType = "application/x-www-form-urlencoded"
client.request( uri, request )
The critical parts are the form variable for the _method=PUT and the
Accept: */* header.
The duplicate Content-Type is probably not needed.