Skip to content

Latest commit

 

History

History
29 lines (20 loc) · 1.25 KB

httpformurlencodedcontent_trycomputelength_1823707804.md

File metadata and controls

29 lines (20 loc) · 1.25 KB
-api-id -api-type
M:Windows.Web.Http.HttpFormUrlEncodedContent.TryComputeLength(System.UInt64@)
winrt method

Windows.Web.Http.HttpFormUrlEncodedContent.TryComputeLength

-description

Computes the HttpFormUrlEncodedContent length in bytes.

-parameters

-param length

The length in bytes of the HttpFormUrlEncodedContent.

-returns

true if length is a valid length; otherwise, false.

-remarks

The TryComputeLength method calculates the content length for HTTP content in HttpFormUrlEncodedContent. Headers set on the content are not included in the content length. This is useful for content types that are easy to calculate the content length.

If computing the content length is not possible or expensive (would require the system to buffer the whole content where the serialization would be expensive or require the system to allocate a lot of memory), this method can return false. If this method returns false, this implies that either chunked transfer is needed or the content must get buffered before being sent to the server.

-examples

-see-also