Class: Uploadcare::Connections::UploadConnection
- Inherits:
-
Faraday::Connection
- Object
- Faraday::Connection
- Uploadcare::Connections::UploadConnection
- Defined in:
- lib/uploadcare/rest/connections/upload_connection.rb
Instance Method Summary collapse
-
#initialize(options) ⇒ UploadConnection
constructor
A new instance of UploadConnection.
Constructor Details
#initialize(options) ⇒ UploadConnection
Returns a new instance of UploadConnection.
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/uploadcare/rest/connections/upload_connection.rb', line 6 def initialize ca_path = '/etc/ssl/certs' if File.exists?('/etc/ssl/certs') super ssl: { ca_path: ca_path }, url: [:upload_url_base] do |frd| frd.request :multipart frd.request :url_encoded frd.adapter :net_http frd.headers['User-Agent'] = Uploadcare::user_agent frd.response :raise_error frd.response :parse_json end end |