Method: IndieWeb::Endpoints::Client#response

Defined in:
lib/indieweb/endpoints/client.rb

#responseHTTP::Response

The HTTP::Response object returned by the provided URL.

Returns:

  • (HTTP::Response)

Raises:



44
45
46
47
48
49
50
51
52
53
54
# File 'lib/indieweb/endpoints/client.rb', line 44

def response
  @response ||= HTTP
                  .follow(max_hops: 20)
                  .headers(HTTP_HEADERS_OPTS)
                  .timeout(connect: 5, read: 5)
                  .get(uri)
rescue HTTP::Error => e
  raise HttpError, e
rescue OpenSSL::SSL::SSLError => e
  raise SSLError, e
end