mirror of
https://github.com/codex-storage/nim-json-rpc.git
synced 2025-02-22 07:58:22 +00:00
Added HTTP afterRead code (WIP)
This commit is contained in:
parent
7839a553a5
commit
b632cbfb25
@ -8,8 +8,11 @@ defineRpcTransport(httpProcessClient):
|
||||
write:
|
||||
let
|
||||
msg = &"Host: {$client.localAddress} Content-Type: application/json-rpc Content-Length: {$value.len} {value}"
|
||||
debug "Http stream", msg = msg
|
||||
debug "Http write", msg = msg
|
||||
client.write(msg)
|
||||
afterRead:
|
||||
# TODO: read: remove http to allow json validation
|
||||
debug "Http read", msg = value
|
||||
|
||||
proc newRpcHttpServer*(addresses: openarray[TransportAddress]): RpcHttpServer =
|
||||
## Create new server and assign it to addresses ``addresses``.
|
||||
|
Loading…
x
Reference in New Issue
Block a user