Method: X::Connection#perform
- Defined in:
- lib/x/connection.rb
#perform(request:) ⇒ Object
42 43 44 45 46 47 48 49 50 |
# File 'lib/x/connection.rb', line 42 def perform(request:) host = request.uri.host || DEFAULT_HOST port = request.uri.port || DEFAULT_PORT http_client = build_http_client(host, port) http_client.use_ssl = request.uri.scheme.eql?("https") http_client.request(request) rescue *NETWORK_ERRORS => e raise NetworkError, "Network error: #{e}" end |