aboutsummaryrefslogtreecommitdiffstats
path: root/test/utils/rpc.ts
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2017-09-01 15:56:17 +0800
committerBrandon Millman <brandon.millman@gmail.com>2017-09-01 15:58:05 +0800
commit4c40b60a2dd0a0758bdb80e2d7924eb984c8b80a (patch)
tree832dd9f6288bff3182ffcb52418a176b8ce82afc /test/utils/rpc.ts
parent134b9dfb23352f33bf8b8a944658b35a7f1cf134 (diff)
downloaddexon-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.ts3
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);