httr2 1.2.0
Lifecycle changes
-
req_perform_stream()has been soft deprecated in favour of
req_perform_connection(). -
Deprecated functions
mutli_req_perform(),req_stream(),with_mock()and
local_mock()have been removed. -
Deprecated arguments
req_perform_parallel(pool),
req_oauth_auth_code(host_name, host_ip, port), and
oauth_flow_auth_code(host_name, host_ip, port)have been removed.
New features
-
Redacted headers are no longer serialized to disk. This is important since it
makes it harder to accidentally leak secrets to files on disk, but comes at a
cost: you can longer perform such requests that have been saved and reloaded
(#721). -
URL construction is now powered by
curl::curl_modify_url(), and hence now
(correctly) escapes thepathcomponent (#732). This means that
req_url_path()now can only affect the path component of the URL, not
the query params or fragment. -
New
last_request_json()andlast_response_json()to conveniently see
JSON bodies (#734). -
New
req_get_url(),req_get_method(),req_get_headers(),
req_body_get_type(), andreq_get_body()allow you to introspect a request
object (#718). -
New
resp_timing()exposes timing information about the request measured
by libcurl (@arcresu, #725).
Minor improvements bug fixues
-
Functions that capture interrutps (like
req_perform_parallel()and friends)
are now easier to escape if they're called inside a loop: you can press
Ctrl + C twice to guarantee an exit (#1810). -
req_perform_iterative(),req_perform_sequential(),
req_perform_parallel(),req_perform_promise(), and
req_perform_connection()now support mocking (#651). To mock the response
fromreq_perform_connection()create a response with the newStreamingBody
for a body. -
new_response()is now exported (#751). -
req_body_json()andreq_body_form()correctly unobfuscated inputs,
as documented (#754). -
req_body_json_modify()can now be used on a request with an empty body. -
req_error()errors with long bodies are now correctly wrapped (#727). -
req_oauth_device()gains anopen_browserargument that lets you take
control of whether a browser is opened or the URL is printed (@plietar, #763) -
req_perform_parallel()handlesprogressargument consistently with other
functions (#726). -
req_url_query()now re-calculates n lengths when using.multi = "explode"
to avoid select/recycling issues (@Kevanness, #719). -
All print methods now send output to stdout, not the message stream.