Class: HttpObservatory::Connection

Inherits:
Object
  • Object
show all
Defined in:
lib/http_observatory/connection.rb

Overview

Constant Summary collapse

BASE =
'https://http-observatory.security.mozilla.org/api/v1'

Class Method Summary collapse

Class Method Details

.apiObject



11
12
13
14
15
16
17
# File 'lib/http_observatory/connection.rb', line 11

def self.api
  Faraday.new(url: BASE) do |faraday|
    faraday.response :logger
    faraday.adapter Faraday.default_adapter
    faraday.headers['Content-Type'] = 'application/json'
  end
end