aboutsummaryrefslogtreecommitdiffstats
path: root/packages/connect/src/http_client.ts
diff options
context:
space:
mode:
authorJacob Evans <dekz@dekz.net>2017-11-23 11:37:34 +0800
committerGitHub <noreply@github.com>2017-11-23 11:37:34 +0800
commit437ac301db3c03c0abd0f741a17c56a4eebc2aa4 (patch)
tree2bd3276289578e99140f8f1168af58f07d566476 /packages/connect/src/http_client.ts
parent9c9ce9752537122df51b935bf1f63f128414fc0f (diff)
parent215740fab27d75630f55e7a3194b9e498b511c08 (diff)
downloaddexon-sol-tools-437ac301db3c03c0abd0f741a17c56a4eebc2aa4.tar
dexon-sol-tools-437ac301db3c03c0abd0f741a17c56a4eebc2aa4.tar.gz
dexon-sol-tools-437ac301db3c03c0abd0f741a17c56a4eebc2aa4.tar.bz2
dexon-sol-tools-437ac301db3c03c0abd0f741a17c56a4eebc2aa4.tar.lz
dexon-sol-tools-437ac301db3c03c0abd0f741a17c56a4eebc2aa4.tar.xz
dexon-sol-tools-437ac301db3c03c0abd0f741a17c56a4eebc2aa4.tar.zst
dexon-sol-tools-437ac301db3c03c0abd0f741a17c56a4eebc2aa4.zip
Merge branch 'development' into feature/calculate-remaining-proportions
Diffstat (limited to 'packages/connect/src/http_client.ts')
-rw-r--r--packages/connect/src/http_client.ts8
1 files changed, 7 insertions, 1 deletions
diff --git a/packages/connect/src/http_client.ts b/packages/connect/src/http_client.ts
index ab8c6bfa1..85dc83c61 100644
--- a/packages/connect/src/http_client.ts
+++ b/packages/connect/src/http_client.ts
@@ -18,6 +18,11 @@ import {
import {schemas as clientSchemas} from './schemas/schemas';
import {typeConverters} from './utils/type_converters';
+// TODO: move this and bigNumberConfigs in the 0x.js package into one place
+BigNumber.config({
+ EXPONENTIAL_AT: 1000,
+});
+
interface RequestOptions {
params?: object;
payload?: object;
@@ -157,9 +162,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) {