Content-Type is to serve data, your server should check the Accept and X-Request headers. If that's application/json it should return a response with the Content-Type as application/json too.
In the Net tab of firebug or the Network tab of webkit inspector you can see the Request headers, which you set with the headers option, and the response headers, response content and more. On Thu, Aug 4, 2011 at 9:45 AM, Lee <[email protected]> wrote: > Hello list, > > new Request.JSON({ > url: this.serverSideUri, > method: 'OPTIONS', > async: true, > emulation: false > }).send(); > > Firebug doesn't tell me anything about this request, only the > response, which I am generating. > > Problem seems to be that my server (Apache 2) sees the request's > content-type headers as application/xml. > > I have tried adding content-type headers to the request, to no avail - > it would be good for me, at least, if any parameter I pass Request > clases overrode those the class itself defines for the request. > > // All ineffective: > headers: { > 'content-type' : 'application/json', > 'contentType' : 'application/json', > 'Content-Type' : 'application/json', > } > > > Do you want me to post this somewhere else? > > Thanks > Lee
