Examples
import { Config } from '@stellar/stellar-sdk';
Config.setAllowHttp(true);
Config.setTimeout(5000);
StellarSdk.Config.setAllowHttp(true);
StellarSdk.Config.setTimeout(5000);
Methods
# static setAllowHttp(value) → {void}
Sets allowHttp
flag globally. When set to true
, connections to insecure
http protocol servers will be allowed. Must be set to false
in
production.
Parameters:
Name | Type | Description |
---|---|---|
value |
boolean
|
- Default Value:
- false
void
# static setTimeout(value) → {void}
Sets timeout
flag globally. When set to anything besides 0, the request
will timeout after specified time (ms).
Parameters:
Name | Type | Description |
---|---|---|
value |
number
|
- Default Value:
- 0
void