getTransport
Get the SDK transport object, either from the provided override or from the...
Import
You can import the entire package and access the function:
_10import * as sdk from "@onflow/sdk"_10_10sdk.getTransport(override)
Or import directly the specific function:
_10import { getTransport } from "@onflow/sdk"_10_10getTransport(override)
Usage
_13import * as fcl from "@onflow/fcl";_13import { httpTransport } from "@onflow/transport-http";_13_13// Get default transport (usually HTTP transport)_13const defaultTransport = await fcl.getTransport();_13_13// Override with custom transport_13const customTransport = await fcl.getTransport({_13 transport: httpTransport({_13 accessNode: "https://rest-mainnet.onflow.org",_13 timeout: 10000_13 })_13});
Parameters
override
(optional)
- Type:
SdkTransport;
- Description: Override default configuration with custom transport or send function