HttpNotAcceptableOutputFormatter Class

Summary

A formatter which selects itself when content-negotiation has failed and writes a 406 Not Acceptable response.

Syntax

public class HttpNotAcceptableOutputFormatter : IOutputFormatter

GitHub

View on GitHub

class Microsoft.AspNet.Mvc.HttpNotAcceptableOutputFormatter

Methods

CanWriteResult(Microsoft.AspNet.Mvc.OutputFormatterContext, MediaTypeHeaderValue)
Arguments:
Return type:

System.Boolean

public bool CanWriteResult(OutputFormatterContext context, MediaTypeHeaderValue contentType)
WriteAsync(Microsoft.AspNet.Mvc.OutputFormatterContext)
Arguments:
Return type:

System.Threading.Tasks.Task

public Task WriteAsync(OutputFormatterContext context)