Skip to content

Instantly share code, notes, and snippets.

@jesuslerma
Created November 27, 2015 22:19
Show Gist options
  • Save jesuslerma/15298e2953a1b11fc9a1 to your computer and use it in GitHub Desktop.
Save jesuslerma/15298e2953a1b11fc9a1 to your computer and use it in GitHub Desktop.
conn = Faraday.new(:url => 'http://jsonplaceholder.typicode.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
conn.get '/comments'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment