Skip to content

创建文章

We are looking for publications that demonstrate building dApps or smart contracts!
See the full list of Gitcoin bounties that are eligible for rewards.

types algo http client with retry.AlgoHttpClientWithRetry

@algorandfoundation/algokit-utils / types/algo-http-client-with-retry / AlgoHttpClientWithRetry

Class: AlgoHttpClientWithRetry

types/algo-http-client-with-retry.AlgoHttpClientWithRetry

A HTTP Client that wraps the Algorand SDK HTTP Client with retries

Hierarchy

AlgoHttpClientWithRetry

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new AlgoHttpClientWithRetry(tokenHeader, baseServer, port?, defaultHeaders?): AlgoHttpClientWithRetry

Parameters
Name Type
tokenHeader TokenHeader
baseServer string
port? string | number
defaultHeaders Record\<string, any>
Returns

AlgoHttpClientWithRetry

Inherited from

URLTokenBaseHTTPClient.constructor

Defined in

src/types/urlTokenBaseHTTPClient.ts:47

Properties

MAX_BACKOFF_MS

Static Private Readonly MAX_BACKOFF_MS: 10000

Defined in

src/types/algo-http-client-with-retry.ts:8


MAX_TRIES

Static Private Readonly MAX_TRIES: 5

Defined in

src/types/algo-http-client-with-retry.ts:7


RETRY_ERROR_CODES

Static Private Readonly RETRY_ERROR_CODES: string[]

Defined in

src/types/algo-http-client-with-retry.ts:13


RETRY_STATUS_CODES

Static Private Readonly RETRY_STATUS_CODES: number[]

Defined in

src/types/algo-http-client-with-retry.ts:12

Methods

callWithRetry

callWithRetry(func): Promise\<BaseHTTPClientResponse>

Parameters
Name Type
func () => Promise\<BaseHTTPClientResponse>
Returns

Promise\<BaseHTTPClientResponse>

Defined in

src/types/algo-http-client-with-retry.ts:25


delete

delete(relativePath, data, query?, requestHeaders?): Promise\<BaseHTTPClientResponse>

Parameters
Name Type
relativePath string
data Uint8Array
query? Query\<string>
requestHeaders Record\<string, string>
Returns

Promise\<BaseHTTPClientResponse>

Overrides

URLTokenBaseHTTPClient.delete

Defined in

src/types/algo-http-client-with-retry.ts:71


get

get(relativePath, query?, requestHeaders?): Promise\<BaseHTTPClientResponse>

Parameters
Name Type
relativePath string
query? Query\<string>
requestHeaders Record\<string, string>
Returns

Promise\<BaseHTTPClientResponse>

Overrides

URLTokenBaseHTTPClient.get

Defined in

src/types/algo-http-client-with-retry.ts:58


post

post(relativePath, data, query?, requestHeaders?): Promise\<BaseHTTPClientResponse>

Parameters
Name Type
relativePath string
data Uint8Array
query? Query\<string>
requestHeaders Record\<string, string>
Returns

Promise\<BaseHTTPClientResponse>

Overrides

URLTokenBaseHTTPClient.post

Defined in

src/types/algo-http-client-with-retry.ts:62