aboutsummaryrefslogtreecommitdiffstats
path: root/packages/connect/src/http_client.ts
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2017-11-22 10:45:02 +0800
committerBrandon Millman <brandon.millman@gmail.com>2017-11-23 05:12:17 +0800
commita61a7b688a03590ba0d09d985db53311eb435bfd (patch)
treed9a6a1cc2ac5a86e78bd2b2401e4c877372d0c9c /packages/connect/src/http_client.ts
parent0e03ef385b03f5b2f916f38001553b1c1c18c383 (diff)
downloaddexon-sol-tools-a61a7b688a03590ba0d09d985db53311eb435bfd.tar
dexon-sol-tools-a61a7b688a03590ba0d09d985db53311eb435bfd.tar.gz
dexon-sol-tools-a61a7b688a03590ba0d09d985db53311eb435bfd.tar.bz2
dexon-sol-tools-a61a7b688a03590ba0d09d985db53311eb435bfd.tar.lz
dexon-sol-tools-a61a7b688a03590ba0d09d985db53311eb435bfd.tar.xz
dexon-sol-tools-a61a7b688a03590ba0d09d985db53311eb435bfd.tar.zst
dexon-sol-tools-a61a7b688a03590ba0d09d985db53311eb435bfd.zip
Prepare connect package for publishing
Diffstat (limited to 'packages/connect/src/http_client.ts')
-rw-r--r--packages/connect/src/http_client.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/packages/connect/src/http_client.ts b/packages/connect/src/http_client.ts
index ab8c6bfa1..3dd0fb55e 100644
--- a/packages/connect/src/http_client.ts
+++ b/packages/connect/src/http_client.ts
@@ -18,6 +18,10 @@ import {
import {schemas as clientSchemas} from './schemas/schemas';
import {typeConverters} from './utils/type_converters';
+BigNumber.config({
+ EXPONENTIAL_AT: 1000,
+});
+
interface RequestOptions {
params?: object;
payload?: object;
@@ -157,9 +161,10 @@ export class HttpClient implements Client {
const headers = new Headers({
'content-type': 'application/json',
});
+
const response = await fetch(url, {
method: requestType,
- body: payload,
+ body: JSON.stringify(payload),
headers,
});
if (!response.ok) {