Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface HttpAgentOptions

Hierarchy

  • HttpAgentOptions

Index

Properties

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

Type declaration

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

Prevents the agent from providing a unique 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, init?: RequestInit): Promise<Response>; (input: string | Request, init?: RequestInit | CMRequestInit): Promise<Response> }

Type declaration

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

      • input: RequestInfo
      • Optional init: RequestInit

      Returns Promise<Response>

    • Parameters

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

      Returns Promise<Response>

host?: string
identity?: Identity | Promise<Identity>
source?: HttpAgent

Generated using TypeDoc