298 Commits

Author SHA1 Message Date
HoneyryderChuck
9c40845d94 added the ability to load plugins in the client, allowing to extend request/response/headers transparently 2017-12-07 01:05:01 +00:00
HoneyryderChuck
3df3eba0fc pimping my examples 2017-12-06 20:32:46 +00:00
HoneyryderChuck
8d1f67d814 encoders: using forwardable, and adding force_encoding support (for http-2) 2017-12-06 20:32:20 +00:00
HoneyryderChuck
734a187ce1 added tests for request body, fixed #bytesize's 2017-12-06 20:16:05 +00:00
HoneyryderChuck
fbdd7e2dd8 added registry module, where one can register by a tag; introducing transcoder, modules which can encode and decode; using them for the body/form/json bodies 2017-12-06 19:49:26 +00:00
HoneyryderChuck
e7b943ba39 requests: added support for post body encoding, for json and form params for now 2017-12-06 19:25:33 +00:00
HoneyryderChuck
3ff56ceb09 changed the concept of an empty http1 channel 2017-12-06 18:24:43 +00:00
HoneyryderChuck
ee59c71274 allow to return early responses just with headers; added a bufferable body, which means, when body is requests, it fetches it (if not available yet); for this, the selector must be exposed to all sub-levels; the response body by default buffers first/returns later for #to_s, and buffers and yields chunks on #each 2017-12-06 17:20:03 +00:00
HoneyryderChuck
6f133bb726 http1: improved request logging, ensured that request has connection set-up 2017-12-06 14:48:13 +00:00
HoneyryderChuck
c180f5ba71 added close callback (http1: when server tells to close; http2: when there are no more streams) 2017-12-06 14:35:49 +00:00
HoneyryderChuck
7cc2f66eed added retryability, in that certain errors (for http2 now, rst_stream ones); added a max concurrent requests setting, which governs how many concurrent requests might be inflight (besides the obvious settings handled by the lower layer) 2017-12-06 14:27:58 +00:00
HoneyryderChuck
abff891a14 introducing the concept of error response; when no response was generated, and stream was closed, assume there was an error, and pass it; the #status message should return the error code; this should keep the multi-send requests from stalling 2017-12-06 11:00:55 +00:00
HoneyryderChuck
95d141b4d9 removed the tcp and ssl channels, added proper IO wrappers (which now enables the possibility of IO customization), and channel just got a bit cleaner 2017-11-29 23:05:30 +00:00
HoneyryderChuck
bd67d3d745 added nonblocking connection, which makes timeouts now much more acurate; force renovation of timeout, as per_operation's first is the connection one (after connection, pass to operation) 2017-11-29 21:26:47 +00:00
HoneyryderChuck
e5c183cb98 monitor value is the channel itself, which responds to #call; this will be the end-all/be-all API 2017-11-29 20:55:08 +00:00
HoneyryderChuck
6728cfac00 closed set/removed in the proper methods 2017-11-29 20:53:16 +00:00
HoneyryderChuck
5c429ebc3f passing the on_response callback in the channel init; this is passed to the processor after 2017-11-29 20:52:39 +00:00
HoneyryderChuck
79c886eac7 tcp: get the remote ip/port early, use them to bind to port 2017-11-29 20:50:29 +00:00
HoneyryderChuck
d411e66942 reworked timeout method: as the channels are now gonna connect on select, just make sure that the first timeout used is the connect timeout (this doesn't solve everything, though) 2017-11-29 19:35:05 +00:00
HoneyryderChuck
5bbc15528e added proper selector/monitor, replaced where necessary 2017-11-29 18:50:47 +00:00
HoneyryderChuck
bf757d194f better example 2017-11-29 18:29:11 +00:00
HoneyryderChuck
2ef5c05b63 add pending requests queue for http2, when one exceeds the number of concurrent streams 2017-11-29 18:28:58 +00:00
HoneyryderChuck
c6badc988e added rakefile with test task 2017-11-29 02:19:15 +00:00
HoneyryderChuck
8164ff0bcb added test to client 2017-11-29 02:18:17 +00:00
HoneyryderChuck
149cfb602d enabled pipelining; allowed for reconnections in HTTP/1 which require to close the connection (which should be the exception) 2017-11-29 02:17:45 +00:00
HoneyryderChuck
c0b1e12130 added support for sending and receiving multiple pipelined requests 2017-11-29 00:10:01 +00:00
HoneyryderChuck
b8ed75e4ff connect to same socket not only based on same ip and port, but also scheme (you don't want to mix http and https in same socket) 2017-11-29 00:09:33 +00:00
HoneyryderChuck
6febd49086 server push: policy now is to ignore pushed resources 2017-11-29 00:08:24 +00:00
HoneyryderChuck
a214891fa1 added timeouts backend like http, integrated it in connecting sockets, and performing selector operations; the global one still needs work though (currently connecting one by one, connection not integrated in selector) 2017-11-29 00:07:49 +00:00
HoneyryderChuck
8edca3e579 added more urls in example, close the client in the end 2017-11-28 18:14:37 +00:00
HoneyryderChuck
d4238691ac fixed the http2 join methods 2017-11-28 18:14:12 +00:00
HoneyryderChuck
c7319964c0 added the options module, similar to http 2017-11-28 18:12:02 +00:00
HoneyryderChuck
70a2d7ad82 added http/1 channel 2017-11-28 16:41:24 +00:00
HoneyryderChuck
f3255ff182 added ssl channel, with alpn negotiation support 2017-11-28 15:09:11 +00:00
HoneyryderChuck
85f08f0c7a changed the resource structure 2017-11-28 14:36:18 +00:00
HoneyryderChuck
46a1223187 addest tests for headers/request/response 2017-11-28 14:00:16 +00:00
HoneyryderChuck
0bcfc7fbe2 added first structure draft, resource names to change, but... it works\! to nghttp2 2017-11-28 01:24:24 +00:00
HoneyryderChuck
63ce9297c8 starting http/2 first, removing rspec 2017-11-28 01:23:41 +00:00
HoneyryderChuck
bbd472186b deleted it all 2017-11-27 22:26:22 +00:00
HoneyryderChuck
b1530da6aa added content-type parser 2017-11-27 17:20:59 +00:00
HoneyryderChuck
c0f2efdc16 added other timeouts, for now empty 2017-11-27 17:20:34 +00:00
HoneyryderChuck
b9091db9fa added main building blocks necessary to implement and verify the public API 2017-11-27 17:15:15 +00:00
HoneyryderChuck
ef17b68274 the spec helper 2017-11-27 16:52:24 +00:00
HoneyryderChuck
a50e4851f6 the .rspec 2017-11-27 16:51:45 +00:00
HoneyryderChuck
397cc106cb the gemspec 2017-11-27 16:51:33 +00:00
HoneyryderChuck
29d1ba470f the Gemfile 2017-11-27 16:51:26 +00:00
HoneyryderChuck
24fe0af2a7 ignoring 2017-11-27 16:51:20 +00:00
HoneyryderChuck
3c122b8894 initial commit 2017-11-27 00:42:45 +00:00