Module: PingMeMaybe::Connection

Defined in:
lib/ping_me_maybe/connection.rb

Class Method Summary collapse

Class Method Details

.cronut_connectionObject



5
6
7
8
9
10
11
12
13
# File 'lib/ping_me_maybe/connection.rb', line 5

def self.cronut_connection
    Faraday.new(PingMeMaybe::Constants::CRONUT_HOST) do |c|
        c.request :url_encoded
        c.use Faraday::Adapter::NetHttp
        c.headers = {
            PingMeMaybe::Constants::CRONUT_API_TOKEN_HEADER => PingMeMaybe::Constants::CRONUT_API_TOKEN
        }
    end
end