aboutsummaryrefslogtreecommitdiffstats
path: root/packages/connect/src/http_client.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-11-23 07:26:48 +0800
committerFabio Berger <me@fabioberger.com>2017-11-23 07:26:48 +0800
commitc66fc634529962bc06a9cfa60633e1bc3c538153 (patch)
tree3ec7063d51f18783ff8519b28b6fbe9d1380d44e /packages/connect/src/http_client.ts
parent805a055946e6b4285e7db9e30263f4f7f41dd4eb (diff)
parent99f2026ce260915ec9eaf013723f1d618965f008 (diff)
downloaddexon-0x-contracts-c66fc634529962bc06a9cfa60633e1bc3c538153.tar.gz
dexon-0x-contracts-c66fc634529962bc06a9cfa60633e1bc3c538153.tar.zst
dexon-0x-contracts-c66fc634529962bc06a9cfa60633e1bc3c538153.zip
Merge branch 'development' into addWebsite
* development: Revert "Publish" Publish Add actual version to CHANGELOG Add blockchainLifecycle management to the ExpirationWatcher test Update connect CHANGELOG.md in preperation for publishing Add TODO comment before BigNumber.config() call Prepare connect package for publishing
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) {