diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2017-09-01 15:56:17 +0800 |
---|---|---|
committer | Brandon Millman <brandon.millman@gmail.com> | 2017-09-01 15:58:05 +0800 |
commit | 4c40b60a2dd0a0758bdb80e2d7924eb984c8b80a (patch) | |
tree | 832dd9f6288bff3182ffcb52418a176b8ce82afc /test/utils/rpc.ts | |
parent | 134b9dfb23352f33bf8b8a944658b35a7f1cf134 (diff) | |
download | dexon-sol-tools-4c40b60a2dd0a0758bdb80e2d7924eb984c8b80a.tar dexon-sol-tools-4c40b60a2dd0a0758bdb80e2d7924eb984c8b80a.tar.gz dexon-sol-tools-4c40b60a2dd0a0758bdb80e2d7924eb984c8b80a.tar.bz2 dexon-sol-tools-4c40b60a2dd0a0758bdb80e2d7924eb984c8b80a.tar.lz dexon-sol-tools-4c40b60a2dd0a0758bdb80e2d7924eb984c8b80a.tar.xz dexon-sol-tools-4c40b60a2dd0a0758bdb80e2d7924eb984c8b80a.tar.zst dexon-sol-tools-4c40b60a2dd0a0758bdb80e2d7924eb984c8b80a.zip |
Add 'content-type' header with value 'application/json' for http requests made JSONRPC endpoints
Diffstat (limited to 'test/utils/rpc.ts')
-rw-r--r-- | test/utils/rpc.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/utils/rpc.ts b/test/utils/rpc.ts index e331fa6d4..436e96423 100644 --- a/test/utils/rpc.ts +++ b/test/utils/rpc.ts @@ -40,6 +40,9 @@ export class RPC { method: 'POST', uri: `http://${this.host}:${this.port}`, body: payload, + headers: { + 'content-type': 'application/json' + }, }; const bodyString = await request(opts); const body = JSON.parse(bodyString); |