Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • HttpAgentOptions
    • HttpAgentOptionsWithIdentity

Index

Properties

credentials?: { name: string; password?: string }

Type declaration

  • name: string
  • Optional password?: string
disableNonce?: boolean

Prevents the agent from providing a unique {@link Nonce} with each call. Enabling may cause rate limiting of identical requests at the boundary nodes.

To add your own nonce generation logic, you can use the following:

example

import {makeNonceTransform, makeNonce} from '@dfinity/agent'; const agent = new HttpAgent({ disableNonce: true }); agent.addTransform(makeNonceTransform(makeNonce);

default

false

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

Type declaration

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

      • input: RequestInfo | URL
      • Optional init: RequestInit

      Returns Promise<Response>

    • Parameters

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

      Returns Promise<Response>

host?: string
identity: Identity
source?: HttpAgent

Generated using TypeDoc