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}
}}
This module may contain code snippets initially implemented in request by request contributors.