as I understood from ASP.net MVC 4 Release notes, is that it has Content Negotiation, and that it will return the content type requested by the client
how is the client asking for a specific content ?
(in my case would be flash asking for XML, using AMF)
Like vansimke said, you just set the content type you need.
In the ActionScript client, it should be as easy as:
request.setHeader("Accept", "application/xml");
The server then respons with the header "Content-Type".
response.setHeader("Content-Type", "application/xml");
Hope that helps!
Edit: headers wrong.
This is just the guess, but I think Accept header should do the trick
The Accept request-header field can be used to specify certain media types which are acceptable for the response. Accept headers can be used to indicate that the request is specifically limited to a small set of desired types, as in the case of a request for an in-line image.
The main differene between Accept and Content-Type is that Accept header specifies type expected in response, when Content-Type specifies actual type of response. Therefore, when requesting, you should use Accept.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With