Class: BerkeleyLibrary::Util::HeadCheck
- Inherits:
-
OkComputer::HttpCheck
- Object
- OkComputer::HttpCheck
- BerkeleyLibrary::Util::HeadCheck
- Defined in:
- lib/berkeley_library/util/uris/head_check.rb
Instance Method Summary collapse
Instance Method Details
#perform_request ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/berkeley_library/util/uris/head_check.rb', line 9 def perform_request headers = {} if .any? user, password = headers['Authorization'] = "Basic #{Base64.strict_encode64("#{user}:#{password}")}" end = { headers: headers, log: false } [:timeout] = request_timeout.to_i if request_timeout URIs.head_response(url, **) rescue StandardError => e raise OkComputer::HttpCheck::ConnectionFailed, e end |