Examples
import { Config } from '@stellar/stellar-sdk';
Config.setAllowHttp(true);
Config.setTimeout(5000);
StellarSdk.Config.setAllowHttp(true);
StellarSdk.Config.setTimeout(5000);
Methods
# static setAllowHttp()
Sets allowHttp
flag globally. When set to true
, connections to insecure
http protocol servers will be allowed. Must be set to false
in
production.
- Default Value:
- false
# static setDefault()
Sets all global config flags to default values.
# static setTimeout()
Sets timeout
flag globally. When set to anything besides 0, the request
will timeout after specified time (ms).
- Default Value:
- 0