38 Commits

Author SHA1 Message Date
jangko
b2417fc071
fix both ws rpc server and client due to websock breaking changes
- change recv() to recvMsg()
2021-08-05 14:54:36 +07:00
jangko
318949a401
fixes ws rpc client bug: error when trying to connect to infura
fixes #109

previously, if using uri such as "wss://mainnet.infura.io/ws/v3/infura-id",
the client will throw error. this bug already fixed in nim-websock,
now this also fixed in json-rpc. it works when connected to infura wss.
2021-07-19 10:35:23 +07:00
jangko
809172abe4
rename ws to websock 2021-06-29 11:51:05 +07:00
jangko
b9e9be8f19
use string.fromBytes to replace cast[string](bytes) 2021-06-24 06:52:32 +07:00
jangko
69e8be66fb
add compression support for websocket rpc server-client
fixes #62
2021-06-24 06:52:31 +07:00
jangko
b8a8ca2623
replace news with nim-ws
fixes #103
2021-06-24 06:52:31 +07:00
Zahary Karadjov
7a9d118929 More proper client closing code 2021-04-07 00:40:54 +03:00
Jacek Sieka
64d40d6c1a
simplify imports (#98)
remove broken uint64 converter - upstream std/json also includes a
broken uint64 converter
2021-03-26 13:17:00 +01:00
Jacek Sieka
ac5288651c
Exception handling signatures (#97)
Minimally work around leaking `Exception` for
https://github.com/status-im/nim-chronos/pull/166
2021-03-26 11:53:03 +01:00
Jacek Sieka
4eb39203eb
fixes (#95)
* fixes

* fix https://github.com/status-im/nimbus-eth2/issues/1650
* only one of `result` and `error` allowed in response
* fix invalid `string` instances being created from byte sequences
* fix large int64 parsing on 32-bit
* fix exception inheritance
* fix some dangling results
* some cleanups

* annotate exception issues, fix cancellation

* more error handling cleanup

* add rudimentary error tests

* cleanups

* simplify init
* use nextId -> lastId to avoid =1 init
* remove obsolete tests
2021-02-15 13:45:51 +01:00
Viktor Kirilov
ecf49a0632 updated news 2020-05-08 16:13:00 +03:00
Zahary Karadjov
f53e0b960b
Fix all tests 2020-03-17 22:05:42 +02:00
Ștefan Talpalaru
72a99cc977
replace getCurrentExceptionMsg() and delete some unused imports 2019-12-02 12:26:09 +01:00
Yuriy Glukhov
d4fbed75c7
Better error handling 2019-11-22 15:14:16 +02:00
Yuriy Glukhov
ef2e3cea19 Log errors in websocket readloop 2019-10-11 19:01:11 +09:00
Yuriy Glukhov
07e82fa194 Allow creating http client from url 2019-07-31 12:38:17 +03:00
Ștefan Talpalaru
8168fcea25 fix some problems raised by Nim 0.20.2 2019-07-19 13:48:26 +03:00
Yuriy Glukhov
881c62ed54 Allow custom headers in ws backend. Set Origin to http://localhost by default 2019-07-02 16:15:41 +03:00
Yuriy Glukhov
4bb08c671b Fixed race condition when rpc server responds too fast 2019-06-26 13:39:58 +03:00
Zahary Karadjov
9d0326aad4 Allow building with chronicles_sinks=json 2019-06-20 18:57:13 +03:00
Yuriy Glukhov
b583dfb029 Use closeWait 2019-06-17 19:56:19 +03:00
Yuriy Glukhov
f19d66b35c Websocket client support and some fixes 2019-06-12 20:53:15 +03:00
cheatfate
a56ad7dfcb
Fix freezes on *nix systems. 2019-05-14 18:42:51 +03:00
cheatfate
2d3db88137 Fix deprecated warnings. 2019-03-25 19:28:31 +02:00
Ștefan Talpalaru
159f9b816e
assert() -> doAssert() 2019-03-13 22:42:07 +01:00
Mamy Ratsimbazafy
53ed44dfa5
Rebrand asyncdispatch2 to chronos (#50) 2019-02-06 18:27:58 +01:00
Ștefan Talpalaru
1083b2972a support Content-Type headers with specified charset
and add RPC message content to the debugging output (at the TRACE level,
disabled by default)
2019-01-28 12:39:27 +02:00
andri lim
0cdeb04a12 fix httpclient logScope 'topic' to 'topics' 2019-01-16 13:03:57 +02:00
andri lim
b9286104e7 use HTTP1.0 and drop connection:keep-alive 2019-01-12 16:17:19 +02:00
cheatfate
6a0b0ff30d Fix support of Content-Length response header. 2018-12-10 13:56:10 +02:00
andri lim
3c4c5559f1 add httpMethod param to httpclient.call 2018-11-13 10:22:43 +07:00
andri lim
06637848de remove httpmethod enum 2018-11-12 21:02:54 +07:00
andri lim
965e2c16f5 fixes #38 add http method get/set to httpclient 2018-11-12 11:43:51 +07:00
andri lim
d224b7dea7 add host to http header 2018-11-07 22:43:52 +07:00
cheatfate
19b3b3aa6d Cosmetic changes. 2018-07-14 11:25:27 +03:00
cheatfate
0942b0387d Add RpcHttpServer.
Add RpcHttpClient.
2018-07-14 10:51:54 +03:00
coffeepots
8b42296553 Cosmetic spacing update 2018-07-13 16:36:06 +01:00
coffeepots
1ca1847600 Make client usable with different transports 2018-07-12 18:36:40 +01:00