Skip to main content

BridgeHttpResponse

Namespace: BlazorNative.Core

An HTTP response returned by IMobileBridge.FetchAsync(BridgeHttpRequest, CancellationToken). Always a complete response: the host buffers the entire body before completing the fetch — there is no partial or streamed delivery.

public readonly record struct BridgeHttpResponse

Inheritance ObjectValueTypeBridgeHttpResponse
Implements IEquatable<BridgeHttpResponse>
Attributes NullableContextAttribute, NullableAttribute, IsReadOnlyAttribute

Properties

StatusCode

The HTTP status code.

public int StatusCode { get; init; }

Property Value

Int32

Body

The complete response body as UTF-8 text (binary bodies are unsupported).

public string Body { get; init; }

Property Value

String

Headers

The response headers.

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

Property Value

IReadOnlyDictionary<String, String>

Constructors

BridgeHttpResponse(Int32, String, IReadOnlyDictionary<String, String>)

An HTTP response returned by IMobileBridge.FetchAsync(BridgeHttpRequest, CancellationToken). Always a complete response: the host buffers the entire body before completing the fetch — there is no partial or streamed delivery.

public BridgeHttpResponse(int StatusCode, string Body, IReadOnlyDictionary<string, string> Headers)

Parameters

StatusCode Int32
The HTTP status code.

Body String
The complete response body as UTF-8 text (binary bodies are unsupported).

Headers IReadOnlyDictionary<String, String>
The response headers.