Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface HttpAgentOptions

Hierarchy

  • HttpAgentOptions

Index

Properties

callOptions?: Record<string, unknown>
credentials?: { name: string; password?: string }

Type declaration

  • name: string
  • Optional password?: string
fetch?: { (input: RequestInfo | URL, init?: RequestInit): Promise<Response>; (input: string | Request | URL, init?: RequestInit): Promise<Response> }

Type declaration

    • (input: RequestInfo | URL, init?: RequestInit): Promise<Response>
    • (input: string | Request | URL, init?: RequestInit): Promise<Response>
    • Parameters

      • input: RequestInfo | URL
      • Optional init: RequestInit

      Returns Promise<Response>

    • Parameters

      • input: string | Request | URL
      • Optional init: RequestInit

      Returns Promise<Response>

fetchOptions?: Record<string, unknown>
host?: string
identity?: Identity | Promise<Identity>
logToConsole?: boolean

Whether to log to the console. Defaults to false.

retryTimes?: number

Number of times to retry requests before throwing an error

default

3

source?: HttpAgent
useQueryNonces?: boolean

Adds a unique Nonce with each query. Enabling will prevent queries from being answered with a cached response.

example

const agent = new HttpAgent({ useQueryNonces: true }); agent.addTransform(makeNonceTransform(makeNonce);

default

false

verifyQuerySignatures?: boolean

Whether the agent should verify signatures signed by node keys on query responses. Increases security, but adds overhead and must make a separate request to cache the node keys for the canister's subnet.

default

true

Generated using TypeDoc