Skip to content

Instantly share code, notes, and snippets.

@barce
Created June 8, 2015 23:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save barce/5e35422ea0b63c95085d to your computer and use it in GitHub Desktop.
Save barce/5e35422ea0b63c95085d to your computer and use it in GitHub Desktop.
test if faraday is working
require 'faraday'
conn = Faraday.new(:url => 'https://www.google.com') do |faraday|
faraday.request :url_encoded # form-encode POST params
faraday.response :logger # log requests to STDOUT
faraday.adapter Faraday.default_adapter # make requests with Net::HTTP
end
response = conn.get '/'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment