Dela via


HttpNoContentOutputFormatter Class

Definition

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

public ref class HttpNoContentOutputFormatter : Microsoft::AspNetCore::Mvc::Formatters::IOutputFormatter
public class HttpNoContentOutputFormatter : Microsoft.AspNetCore.Mvc.Formatters.IOutputFormatter
type HttpNoContentOutputFormatter = class
    interface IOutputFormatter
Public Class HttpNoContentOutputFormatter
Implements IOutputFormatter
Inheritance
HttpNoContentOutputFormatter
Implements

Constructors

HttpNoContentOutputFormatter()

Properties

TreatNullValueAsNoContent

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

Methods

CanWriteResult(OutputFormatterCanWriteContext)

Determines whether this IOutputFormatter can serialize an object of the specified type.

WriteAsync(OutputFormatterWriteContext)

Writes the object represented by context's Object property.

Applies to