Extends Controller with Negotiated() ActionResult that does basic content negotiation based on the Accept header.
public static class NegotiatedResultExtensions : object
|Return content-negotiated content of the data based on Accept header. Supports: application/json - using JSON.NET text/xml - Xml as XmlSerializer XML text/html - as text, or an optional View text/plain - as text
public static NegotiatedResult Negotiated(Controller controller, object data)
public static NegotiatedResult Negotiated(Controller controller, string viewName, object data)
Comment or report problem with topic