Sha256: b577462821b7cc51ba6312ba53a595aabaf3dafec6ba48e258dde860eb4e3d1f

Contents?: true

Size: 337 Bytes

Versions: 8

Compression:

Stored size: 337 Bytes

Contents

# frozen_string_literal: true

gem 'http'
require 'http'

class HttpAdapter
  def call(url, query, headers = {}, proxy = {})
    if proxy[:host]
      HTTP[headers].via(proxy[:host], proxy[:port], proxy[:username], proxy[:password])
        .get(url, params: query)
    else
      HTTP[headers].get(url, params: query)
    end
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
wcc-media-client-0.2.4 lib/rest_client/http_adapter.rb
wcc-media-client-0.2.3 lib/rest_client/http_adapter.rb
wcc-media-client-0.2.2 lib/rest_client/http_adapter.rb
wcc-media-client-0.2.1 lib/rest_client/http_adapter.rb
wcc-media-client-0.2.0 lib/rest_client/http_adapter.rb
wcc-contentful-0.2.2 lib/wcc/contentful/simple_client/http_adapter.rb
wcc-contentful-0.2.1 lib/wcc/contentful/simple_client/http_adapter.rb
wcc-contentful-0.2.0 lib/wcc/contentful/simple_client/http_adapter.rb