Sha256: d7a32cf499edbbcf532cbcf66beae2d94d880166b6171ae590730cb81487f631

Contents?: true

Size: 719 Bytes

Versions: 8

Compression:

Stored size: 719 Bytes

Contents

module Docusigner
  class Connection < ActiveResource::Connection
    def post(path, body = '', headers = {})
      if body.is_a?(Array)
        with_auth do
          req = Docusigner::Multipart::Post.new(path, body, build_request_headers(headers, :post, self.site.merge(path)))
          handle_response(http.request(req))
        end
      else
        super(path, body, headers)
      end
    end

    def put(path, body = '', headers = {})
      if body.is_a?(Array)
        req = Docusigner::Multipart::Put.new(path, body, headers)
        with_auth { request(:request, req, build_request_headers(headers, :put, self.site.merge(path))) }
      else
        super(path, body, headers)
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
docusigner-0.0.9 lib/docusigner/connection.rb
docusigner-0.0.8 lib/docusigner/connection.rb
docusigner-0.0.6 lib/docusigner/connection.rb
docusigner-0.0.5 lib/docusigner/connection.rb
docusigner-0.0.4 lib/docusigner/connection.rb
docusigner-0.0.3 lib/docusigner/connection.rb
docusigner-0.0.2 lib/docusigner/connection.rb
docusigner-0.0.1 lib/docusigner/connection.rb