Skip to content

Instantly share code, notes, and snippets.

@grk
Created April 7, 2013 12:57
Show Gist options
  • Save grk/5330402 to your computer and use it in GitHub Desktop.
Save grk/5330402 to your computer and use it in GitHub Desktop.
source "https://rubygems.org"
gem 'faraday'
gem 'faraday_middleware'
gem 'active_support'
GEM
remote: https://rubygems.org/
specs:
active_support (3.0.0)
activesupport (= 3.0.0)
activesupport (3.0.0)
faraday (0.8.7)
multipart-post (~> 1.1)
faraday_middleware (0.9.0)
faraday (>= 0.7.4, < 0.9)
multipart-post (1.2.0)
PLATFORMS
ruby
DEPENDENCIES
active_support
faraday
faraday_middleware
require 'rubygems'
require 'bundler/setup'
require 'active_support'
require 'faraday'
require 'faraday_middleware'
conn = Faraday.new('https://www.google.com') do |conn|
conn.use :instrumentation
end
puts conn.get('/').body
conn = Faraday.new('https://www.google.com') do |conn|
conn.use :instrumentation
conn.adapter Faraday.default_adapter
end
puts conn.get('/').body
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment