mirror of
https://github.com/logos-storage/nim-json-rpc.git
synced 2026-01-05 15:13:11 +00:00
specify Content-Type: application/json HTTP header (#129)
This commit is contained in:
parent
733a05b00c
commit
0540afad4c
@ -52,7 +52,8 @@ method call*(client: RpcHttpClient, name: string,
|
||||
reqBody = $rpcCallNode(name, params, id)
|
||||
req = HttpClientRequestRef.post(client.httpSession,
|
||||
client.httpAddress.get,
|
||||
body = reqBody.toOpenArrayByte(0, reqBody.len - 1))
|
||||
body = reqBody.toOpenArrayByte(0, reqBody.len - 1),
|
||||
headers = [("Content-Type", "application/json")])
|
||||
res =
|
||||
try:
|
||||
await req.send()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user