Releases: ropensci/crul
Releases · ropensci/crul
crul v0.7.4
NEW FEATURES
- event hooks added to
HttpClient
. both request and response hooks supported. not supported in async methods for now (#76) (#107)
MINOR IMPROVEMENTS
- improve
$parse()
behavior (in theHttpResponse
object) when using disk or stream.$parse()
was throwing a warning when using disk and an error when using stream. and improves behavior when doing async requests (#104) Paginator
gains optional progress bar through the newprogress
parameter. In addition, thecat()
calls inside the method were removed, so as not to insert newlines with each page and to not print "OK" when done (#106) thanks @boshek
BUG FIXES
crul v0.7.0
NEW FEATURES
HttpClient
gains aretry
method: retries any request verb until successful (HTTP response status < 400) or a condition for giving up is met. (#89) (#95) thanks @hlappHttpClient
,HttpRequest
, andAsync
classes gainverb
method for doing HTTP requests specifying any of the supported HTTP verbs (#97)HttpClient
andPaginator
gain aurl_fetch
method: get the URL that would be sent in an HTTP request without sending the HTTP request. Useful for getting the URL before executing an HTTP request if you need to check something about the URL first. (#92)- new vignette for "API package best practices" (#65)
- Package gains manual files for each HTTP verb to facilitate linking to package documentation for information on each HTTP verb (#98)
- Intermediate headers (e.g., those in redirect chains) are now given back in a new slot in the
HttpResponse
class as$response_headers_all
as an unnamed list, with each element a named list of headers; the last list in the set is the final response headers that match those given in the$response_headers
slot (#60) (#99)
BUG FIXES
DEFUNCT
HttpStubbedResponse
was removed from the package - it may have been used at some point, but is not used in the package anymore (#88)
crul v0.6.0
NEW FEATURES
Async
andAsyncVaried
now support simple auth, see?auth
(#70)- gains new function
ok()
to ping a URL to see if it's up or not, returns a single boolean (#71) (#73) HttpClient
andHttpRequest
gain new parameterprogress
that accepts a function to use to construct a progress bar. For now acceptshttr::progress()
but will accept other options in the future (#20) (#81)- gains a new vignette for curl options (#7)
- can now set curl options globally using new functions
set_auth()
,set_headers()
,set_opts()
,set_proxy()
, andcrul_settings()
(#48) (#85)
MINOR IMPROVEMENTS
- explicitly import
httpcode::http_code
(#80) - fix vignette names to make them more clear and add numbers to order them (#64)
- change print function for
Async
andAsyncVaried
to print max of 10 and tell user how many total and remaining not shown (#72) - added support to
proxy()
for socks, e.g. to use with TOR (#79) - now when
Async
andAsyncVaried
requests fail, they don't error but instead we capture the error and pass it back in the result. this way any failure requests don't stop progress of the entire async request suite (#74) (#84)
crul v0.5.2
MINOR IMPROVEMENTS
- Fixed handling of user agent: you can pass a UA string
as a curl option or a header. Previously, we were wrongly overwriting
the user input UA if given as a curl option - but were not doing
so if given as a header. This is fixed now. (#63) thx to @maelle and @dpprdan
BUG FIXES
- Fix to
Paginator
- it wasn't handling pagination correctly.
In addition, fixed to hopefully handle all scenarios now. added
more tests (#62) - Fixed handling of query parameters. We were using
urltools::url_encode
to encode strings, but it wasn't encoding correctly in some locales. Usingcurl::curl_escape
fixes the problem. Encoding is done on query values and names (#67) (#68)
crul v0.5.0
NEW FEATURES
- Gains a new R6 class
Paginator
to help users automatically paginate through multiple requests. It only supports query parameter based paginating for now. We'll add support later for other types including cursors (e.g., used in Solr servers), and for link headers (e.g., used in the GitHub API). Please get in touch if you find any problems withPaginator
. (#56) - Async classes
Async
andAsyncvaried
gain ability to write to disk and stream data (to disk or elsewhere, e.g. R console or to an R object) (#46) thanks @artemklevtsov for the push to do this
MINOR IMPROVEMENTS
- Improved documentation for
auth
to indicate thatuser
andpwd
are indeed required - and to further indicate that one can pass inNULL
to those parameters (similar to an empty string""
inhttr::authenticate
) when one e.g. may want to usegssnegotiate
method (#43) - Fixed query builder so that one can now protect query parameters by wrapping them in
I()
(#55)
BUG FIXES
- Fixed bug in
head
requests withHttpClient
when passingquery
parameter - it was failing previously. Addedquery
parameter back. (#52)
crul v0.4.0
NEW FEATURES
- file uploads now work, see new function
upload()
and examples (#25)
MINOR IMPROVEMENTS
- fixes to reuse curl handles - within a connection object only,
not across connection objects (#45) crul
now drops any options passed in toopts
or to...
that
are not in set of allowed curl options, seecurl::curl_options()
(#49)- cookies should now be persisted across requests within
a connection object, see new doc?cookies
for how to set cookies (#44) - gather cainfo and use in curl options when applicable (#51)
- remove
disk
andstream
fromhead
method inHttpClient
andHttpRequest
as no body returned in a HEAD request
crul v0.3.8
BUG FIXES
- Fixed
AsyncVaried
to return async responses in the order that
they were passed in. This also fixes this exact same behavior in
Async
becauseAsync
usesAsyncVaried
internally. (#41)
thanks @dirkschumacher for reporting
crul v0.3.6
- Note: This version gains support for integration with
webmockr
, which is now on CRAN.
NEW FEATURES
- New function
auth()
to do simple authentication (#33) - New function
HttpStubbedResponse
for making a stubbed
response object for thewebmockr
integration (#4) - New function
mock()
to turn on mocking - it's off by
default. Ifwebmockr
is not installed but user attempts
to use mocking we error with message to install
webmockr
(#4)
MINOR IMPROVEMENTS
crul v0.3.4
NEW FEATURES
- New utility functions
url_build
andurl_parse
(#31)
MINOR IMPROVEMENTS
- Now using markdown for documentation (#32)
- Better documentation for
AsyncVaried
(#30) - New vignette on how to use
crul
in realistic
scenarios rather than brief examples to demonstrate
individual features (#29) - Better documentation for
HttpRequest
(#28) - Included more tests
BUG FIXES
crul v0.3.0
NEW FEATURES
- Added support for asynchronous HTTP requests, including two new
R6 classes:Async
andAsyncVaried
. The former being a simpler
interface treating all URLs with same options/HTTP method, and the latter
allowing any type of request through the new R6 classHttpRequest
(#8) (#24) - New R6 class
HttpRequest
to supportAsyncVaried
- this method
only defines a request, but does not execute it. (#8)
MINOR IMPROVEMENTS
- Added support for proxies (#22)
BUG FIXES
- Fixed parsing of headers from FTP servers (#21)