18 Commits

Author SHA1 Message Date
HoneyryderChuck
12d4885136 response body now holds the full options from the request 2021-03-05 19:04:09 +00:00
HoneyryderChuck
b6c94f1702 added test for unsupported charset in response 2021-02-18 10:43:48 +00:00
HoneyryderChuck
7e26c86dc1 really closing a response (won't buffer stuff anymore after being closed) 2020-11-22 15:55:44 +00:00
HoneyryderChuck
41ca6fadbb added test for copy_to; also, fixed it (rewind before copy) 2020-03-15 19:59:39 +00:00
HoneyryderChuck
aebadc8bc9 testing Response#read 2020-03-10 18:58:31 +00:00
HoneyryderChuck
6005165271 testing status reach of HTTPError 2019-12-31 01:56:21 +00:00
HoneyryderChuck
a421fb121b minimal changes to accomodate new kwargs syntax 2019-12-30 02:24:04 +00:00
HoneyryderChuck
e36c6347bf rubocop indications 2018-03-23 14:48:10 +00:00
HoneyryderChuck
67eb755a3b added Response#raise_for_status, which raises an exception if the http code is an error code; it also duck-types the error response, which will raise its exception 2018-03-23 10:53:16 +00:00
HoneyryderChuck
2b1ab8b6b6 rubocop auto-corrections according to some basic rules for now 2018-01-28 22:33:41 +00:00
HoneyryderChuck
57aa3b5159 testing the client yield feature and the response body buffer transitions 2018-01-28 21:59:08 +00:00
HoneyryderChuck
284bb06663 added versioning to response (important to test h2c, but also to ensure which 1.x is responding) 2018-01-06 19:23:39 +00:00
HoneyryderChuck
957fc46bcf response: do not alias #write to #<<, makes it hard to extend; #each now yields predictable-size chunks, instead of deferring to buffer#each, which can do whatever 2017-12-22 13:14:33 +02:00
HoneyryderChuck
15a5ffffdd allow to pass a custom body class, which only needs to implement the constructor signature and #<< 2017-12-11 13:10:58 +00:00
HoneyryderChuck
40a73f5a7b made body threshold size (the max buffered size after which the response body is buffered to disk) a top-level option 2017-12-11 12:43:05 +00:00
HoneyryderChuck
d8eb3bbe5f went back from returning partial responses, and only expose fully buffered responses to the user; the main issue being, the main API favours closing the connection after requests, and this makes the whole handling of partial responses confusing and error prone; this way, one can buffer the body, even to the filesystem, and maybe make this tunable in the future 2017-12-08 19:01:44 +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
46a1223187 addest tests for headers/request/response 2017-11-28 14:00:16 +00:00