class Faraday::ParamPart

Multipart value used to POST data with a content type.

def headers

Returns:
  • (Hash) -
def headers
  {
    'Content-Type' => content_type,
    'Content-ID' => content_id
  }
end

def initialize(value, content_type, content_id = nil)

Returns:
  • (Faraday::ParamPart) -

Parameters:
  • content_id (String) -- Optional String of this value's Content-ID.
  • content_type (String) -- String content type of the value.
  • value (String) -- Uploaded content as a String.
def initialize(value, content_type, content_id = nil)
  @value = value
  @content_type = content_type
  @content_id = content_id
end

def to_part(boundary, key)

Returns:
  • (Faraday::Parts::Part) -

Parameters:
  • key (String) -- String key name for this value.
  • boundary (String) -- String multipart boundary that must not exist in
def to_part(boundary, key)
  Faraday::Parts::Part.new(boundary, key, value, headers)
end