@request/multipart
v0.1.1
Published
HTTP Multipart Body Stream
Downloads
210
Readme
@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.