Sha256: 31249c316a5fc9102ae260dc777d29fba3d662f4806b3f214a050b550662be40

Contents?: true

Size: 510 Bytes

Versions: 9

Compression:

Stored size: 510 Bytes

Contents

require 'multipart_post'
require 'parts'

Parts::ParamPart.class_eval do
  def build_part(boundary, name, value)
    part = "\r\n" #Add a leading carriage return line feed (not sure why DocuSign requires this)
    part << "--#{boundary}\r\n"
    part << "Content-Type: application/json\r\n" #Add the content type which isn't present in the multipart-post gem, but DocuSign requires
    part << "Content-Disposition: form-data; name=\"#{name.to_s}\"\r\n"
    part << "\r\n"
    part << "#{value}\r\n"
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
docusign_rest-0.0.9 lib/multipart_post/parts.rb
docusign_rest-0.0.8 lib/multipart_post/parts.rb
docusign_rest-0.0.7 lib/multipart_post/parts.rb
docusign_rest-0.0.6 lib/multipart_post/parts.rb
docusign_rest-0.0.5 lib/multipart_post/parts.rb
docusign_rest-0.0.4 lib/multipart_post/parts.rb
docusign_rest-0.0.3 lib/multipart_post/parts.rb
docusign_rest-0.0.2 lib/multipart_post/parts.rb
docusign_rest-0.0.1 lib/multipart_post/parts.rb