HttpBody¶
Import: import system.net;
Read the usage guide for examples and common tasks. This reference lists the public declarations for this part of the library. See Reading API signatures for parameter and result notation.
HttpBody¶
An HTTP response byte stream. One read may be pending; cancellation can consume bytes.
read_async¶
Reads up to max_bytes; empty success for a positive request is EOF. Zero consumes nothing. Errors use IoError for compatibility with async streams; concurrent reads return EBUSY.
public async unique fun read_async(
max_bytes: int,
token: Option<CancellationToken> = Option.None
): Result<byte[], IoError>
close¶
Releases the response transport and cancels a pending read; safe to call repeatedly.