Class: DiasporaFederation::HttpClient
- Inherits:
-
Object
- Object
- DiasporaFederation::HttpClient
- Defined in:
- lib/diaspora_federation/http_client.rb
Overview
A wrapper for Faraday
Class Method Summary collapse
-
.connection ⇒ Faraday::Connection
Gets the Faraday connection.
-
.get(uri) ⇒ Faraday::Response
Perform a GET request.
Class Method Details
.connection ⇒ Faraday::Connection
Gets the Faraday connection
23 24 25 26 |
# File 'lib/diaspora_federation/http_client.rb', line 23 def self.connection create_default_connection unless @connection @connection.dup end |
.get(uri) ⇒ Faraday::Response
Perform a GET request
16 17 18 |
# File 'lib/diaspora_federation/http_client.rb', line 16 def self.get(uri) connection.get(uri) end |