class Staccato::Adapter::Faraday
Public Class Methods
new(uri) { |faraday| ... }
click to toggle source
# File lib/staccato/adapter/faraday.rb, line 6 def initialize(uri) @connection = ::Faraday.new(uri) do |faraday| faraday.request :url_encoded # form-encode POST params faraday.adapter ::Faraday.default_adapter # make requests with Net::HTTP yield faraday if block_given? end end
Public Instance Methods
post(params)
click to toggle source
# File lib/staccato/adapter/faraday.rb, line 15 def post(params) @connection.post(nil, params) end