Sisk

Property

HttpRequest.HasBody

Namespace
Sisk.Cadente
Assembly
Sisk.Cadente.dll

HasBody #

Gets a value indicating whether the request may have a message body.

C#
public bool HasBody { get; }

Property Value #

bool

Remarks #

This property returns true if the content length is greater than zero or if the request uses chunked transfer encoding, indicating that a body may be present. However, for chunked encoding, the actual content could still be empty even when this property returns true. Use this property to determine whether it is necessary to attempt reading or processing the request body, but do not assume that a body is always present.

HasBody #

Gets a value indicating whether the request may have a message body.

C#
public bool HasBody { get; }

Property Value #

bool

Remarks #

This property returns true if the content length is greater than zero or if the request uses chunked transfer encoding, indicating that a body may be present. However, for chunked encoding, the actual content could still be empty even when this property returns true. Use this property to determine whether it is necessary to attempt reading or processing the request body, but do not assume that a body is always present.

Type to search the documentation and the API reference.