Skip to content
docs

acrossHttp

acrossHttp(url, init, opts): Promise<AcrossHttpAnswer>

Defined in: protocol-swap2-across/src/api.ts:453

One request to an Across API, bounded by timeoutMs (and the caller’s signal). An answer that came through a redirect, or from another origin than the URL’s, is refused (policy_refused) — a key header must not follow one, and React Native’s fetch follows redirects whatever redirect says. Throws AcrossRefusal api-answer for a redirect, an answer larger than any quote, or no answer (upstream_unavailable; unclassified when the caller’s own signal fired).

string

string

Record<string, string>

"GET" | "POST"

{(input, init?): Promise<Response>; (input, init?): Promise<Response>; }

AbortSignal

number

string

Promise<AcrossHttpAnswer>