Class: DiasporaFederation::HttpClient

Inherits:
Object
  • Object
show all
Defined in:
lib/diaspora_federation/http_client.rb

Overview

A wrapper for Faraday

Class Method Summary collapse

Class Method Details

.connectionFaraday::Connection

Gets the Faraday connection


21
22
23
24
# File 'lib/diaspora_federation/http_client.rb', line 21

def self.connection
  create_default_connection unless @connection
  @connection.dup
end

.get(uri) ⇒ Faraday::Response

Perform a GET request


14
15
16
# File 'lib/diaspora_federation/http_client.rb', line 14

def self.get(uri)
  connection.get(uri)
end