Created
April 7, 2013 12:57
-
-
Save grk/5330402 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source "https://rubygems.org" | |
gem 'faraday' | |
gem 'faraday_middleware' | |
gem 'active_support' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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