src/packages/EmbedIO/HttpResponseExtensions.cs
/// <summary>
/// Prepares a standard response without a body for the specified status code.
/// </summary>
/// <param name="this">The <see cref="IHttpResponse"/> interface on which this method is called.</param>
/// <param name="statusCode">The HTTP status code of the response.</param>
/// <exception cref="NullReferenceException"><paramref name="this"/> is <see langword="null"/>.</exception>
/// <exception cref="ArgumentException">There is no standard status description for <paramref name="statusCode"/>.</exception>
Prepares a standard response without a body for the specified status code.
Prepares a standard response without a body for the specified status code .
public static void SetEmptyResponse(this IHttpResponse @this, int statusCode)
        {
            if (!HttpStatusDescription.TryGet(statusCode, out var statusDescription))
                throw new ArgumentException("Status code has no standard description.", nameof(statusCode));
            @this.StatusCode = statusCode;
            @this.StatusDescription = statusDescription;
            @this.ContentType = MimeType.Default;
            @this.ContentEncoding = null;
        }
public static void SetEmptyResponse ( this IHttpResponse @this , int statusCode ) { if ( ! HttpStatusDescription . TryGet ( statusCode , out var statusDescription ) ) throw new ArgumentException ( " " , nameof ( statusCode ) ) ; @this . StatusCode = statusCode ; @this . StatusDescription = statusDescription ; @this . ContentType = MimeType . Default ; @this . ContentEncoding = null ; }
Prepares a standard response without a body for the specified status code.
Prepares a standard response without a body for the specified status code .
None
There is no standard status description for .
There is no standard status description for .
IHttpResponse
this
statusCode
int
The HTTP status code of the response.
The HTTP status code of the response .
this
The  interface on which this method is called.
The interface on which this method is called .