@request/multipart

0.1.1 • Public • Published

@request/multipart

See @request/core for more details.

var options = {
  // related
  multipart: [],
  // form-data
  multipart: {},

  // optional
  contentType: 'multipart/related; boundary=',
  boundary: '',
  preambleCRLF: true,
  postambleCRLF: true
}


var result = multipart(options)

result.contentType
result.body
// related
multipart: [{key: 'value', body: 'body'}]
multipart: [{key: 'value', body: 'body'}]

// form-data
multipart: {key: 'value'}
multipart: {key: ['value', 'value']}
multipart: {key: {
  value: 'value',
  options: {filename: '', contentType: '', knownLength: 0}
}}

Notice

This module may contain code snippets initially implemented in request by request contributors.

Dependencies (4)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i @request/multipart

    Weekly Downloads

    31

    Version

    0.1.1

    License

    Apache-2.0

    Last publish

    Collaborators

    • request
    • simov