Sha256: 549f62f211ff990ca2b9f5392228e7da45daab98721bbabb9b2156a381dec99f
Contents?: true
Size: 536 Bytes
Versions: 1
Compression:
Stored size: 536 Bytes
Contents
require 'faraday_middleware' module HN module Connection private def connection options = { headers: headers, ssl: { verify: false }, url: api_url } Faraday.new(options) do |connection| connection.use Faraday::Request::UrlEncoded connection.use Faraday::Response::RaiseError connection.use Faraday::Response::Mashify connection.use Faraday::Response::ParseJson connection.adapter(Faraday.default_adapter) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
hn_api-0.0.1 | lib/hn/connection.rb |