URIs#path_escape
now attempts to convert non-UTF-8 strings to UTF-8 rather than immediately raising an error.
- Add
Retry-After
support toRequester
for429 Too Many Requests
and503 Service Unavailable
.
- Allow passing
log: false
toRequester
methods (and correspondingURIs
convenience methods) to suppress logging of each request URL and response code. - Allow constructing
Requester
instances with delayed execution - Fix documentation for
get_response
andhead_response
inURIs
andRequester
- Fix issue in
Requester
where query parameters would not be appended properly to URLs that already included a query string. - Fix issue in
URIs#append
(andAppender
) where?
would not be accepted in query strings or fragments, contrary to RFC 3986 §3. - Fix documentation for
Arrays#find_indices
. - Fix issue where
Arrays#find_index
would raise a confusingNameError
instead of a helpfulArgumentError
if passed too many arguments.
- Adds
URIs#path_escape
to escape URL path segments - Adds
URIs#head
andURIs#head_response
, to make a HEAD request and return the HTTP status code and raw response object, respectively - Clarifies documentation for
URIs#get
andURIs#get_response
regarding unsuccessful requests
- Adds
URIs#safe_parse_uri
, which returnsnil
for invalid URLs (unlikeURIs#uri_or_nil
, which raisesURI::InvalidURIError
for non-nil, non-parseable URLs) - Updates documentation for
URIs#uri_or_nil
andValidator#uri_or_nil
to clarify thatnil
is an acceptable argument.
- Adds
URIs#get_response
, which returns a completeRestClient::Response
rather than just the response body.
- Adds
BerkeleyLibrary::Files
, which contains file and IO utility methods
URIs#append
now handles bare URLs with empty paths, with the caveat that a root path/
will always be added, even if there are no path elements to append.
- Initial extraction of code from
berkeley_library/tind
.