Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

This code appears to be completely unnecessary

  • Loading branch information...
commit 460ae2134248603b9dd58f524bec9f2e6e43180b 1 parent 801ba44
@sferik authored
Showing with 1 addition and 6 deletions.
  1. +1 −6 lib/twitter/request/multipart_with_file.rb
View
7 lib/twitter/request/multipart_with_file.rb
@@ -3,17 +3,12 @@
module Twitter
module Request
class MultipartWithFile < Faraday::Middleware
- CONTENT_TYPE = 'Content-Type'.freeze
- class << self
- attr_accessor :mime_type
- mime_type = 'multipart/form-data'.freeze
- end
+ CONTENT_TYPE = 'Content-Type'
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)
- env[:request_headers][CONTENT_TYPE] = self.class.mime_type
end
end if env[:body].is_a?(::Hash)
@app.call(env)
Please sign in to comment.
Something went wrong with that request. Please try again.