Examples
Usage in node
import { Config } from '@stellar/stellar-sdk';
Config.setAllowHttp(true);
Config.setTimeout(5000);
Usage in the browser
StellarSdk.Config.setAllowHttp(true);
StellarSdk.Config.setTimeout(5000);
Methods
# static isAllowHttp() → {boolean}
Returns the configured allowHttp flag.
The allowHttp value.
boolean
# 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