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).
Parameters
Section titled “Parameters”string
string
headers
Section titled “headers”Record<string, string>
method
Section titled “method”"GET" | "POST"
fetchImpl?
Section titled “fetchImpl?”{(input, init?): Promise<Response>; (input, init?): Promise<Response>; }
signal?
Section titled “signal?”AbortSignal
timeoutMs
Section titled “timeoutMs”number
string
Returns
Section titled “Returns”Promise<AcrossHttpAnswer>