Parent

Methods

Class/Module Index [+]

Quicksearch

Twitter::Request::MultipartWithFile

Constants

CONTENT_TYPE

Public Instance Methods

call(env) click to toggle source
# File lib/twitter/request/multipart_with_file.rb, line 8
def call(env)
  env[:body].each do |key, value|
    if value.respond_to?(:to_io)
      env[:body][key] = Faraday::UploadIO.new(value, mime_type(value.path), value.path)
    end
  end if env[:body].is_a?(::Hash)
  @app.call(env)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.