Skip to content

WebResponse

Namespace: E2E

public sealed class WebResponse

A response CancellationToken) matched.

Inheritance: object

View source

public IReadOnlyDictionary<string, string> Headers { get; }

Response headers, with lower-cased names.

Value: IReadOnlyDictionary<string, string>

View source

public int Status { get; }

HTTP status.

Value: int

View source

public string Url { get; }

Response URL.

Value: string

View source

public Task<T?> JsonAsync<T>(CancellationToken cancellationToken = default)

Waits for the body as TextAsync(CancellationToken) does and deserializes it as JSON.

Type parameters

Name Description
T

Parameters

Name Type Description
cancellationToken CancellationToken

Returns: Task<T>

View source

public Task<string> TextAsync(CancellationToken cancellationToken = default)

Waits for the body, up to the action timeout, and reads it as text. Fails with ACTION_FAILED when the body could not be read or did not finish in time.

Parameters

Name Type Description
cancellationToken CancellationToken

Returns: Task<string>

View source