Property
HttpRequest.HasBody
HasBody #
Gets a value indicating whether the request may have a message body.
public bool HasBody { get; }Property Value #
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.
public bool HasBody { get; }Property Value #
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.