Method: OkComputer::HttpCheck#perform_request
- Defined in:
- lib/ok_computer/built_in_checks/http_check.rb
#perform_request ⇒ Object
Public: Actually performs the request against the URL. Returns response body if the request was successful. Otherwise raises a HttpCheck::ConnectionFailed error.
36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/ok_computer/built_in_checks/http_check.rb', line 36 def perform_request Timeout.timeout(request_timeout) do = { read_timeout: request_timeout } if .any? [:http_basic_authentication] = end url.read() end rescue => e raise ConnectionFailed, e end |