HttpNoContentOutputFormatter Class

Summary

Sets the status code to 204 if the content is null.

Syntax

public class HttpNoContentOutputFormatter : IOutputFormatter

GitHub

View on GitHub

class Microsoft.AspNet.Mvc.HttpNoContentOutputFormatter

Properties

TreatNullValueAsNoContent()

Indicates whether to select this formatter if the returned value from the action is null.

Return type:System.Boolean
public bool TreatNullValueAsNoContent { get; set; }

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)