@@ -186,7 +186,17 @@ form.submit({
186186
187187### Methods
188188
189- ##### _ void_ append( ** String** _ field_ , ** Mixed** _ value_ [ , ** Mixed** _ options_ ] )
189+ - [ _ Void_ append( ** String** _ field_ , ** Mixed** _ value_ [ , ** Mixed** _ options_ ] )] ( https://github.com/form-data/form-data#void-append-string-field-mixed-value--mixed-options- ) .
190+ - [ _ Array_ getHeaders( [ ** Array** _ userHeaders_ ] )] ( https://github.com/form-data/form-data#array-getheaders-array-userheaders- )
191+ - [ _ String_ getBoundary()] ( https://github.com/form-data/form-data#string-getboundary )
192+ - [ _ Buffer_ getBuffer()] ( https://github.com/form-data/form-data#buffer-getbuffer )
193+ - [ _ Integer_ getLengthSync()] ( https://github.com/form-data/form-data#integer-getlengthsync )
194+ - [ _ Integer_ getLength( ** function** _ callback_ )] ( https://github.com/form-data/form-data#integer-getlength-function-callback- )
195+ - [ _ Boolean_ hasKnownLength()] ( https://github.com/form-data/form-data#boolean-hasknownlength )
196+ - [ _ Request_ submit( _ params_ , ** function** _ callback_ )] ( https://github.com/form-data/form-data#request-submit-params-function-callback- )
197+ - [ _ String_ toString()] ( https://github.com/form-data/form-data#string-tostring )
198+
199+ #### _ Void_ append( ** String** _ field_ , ** Mixed** _ value_ [ , ** Mixed** _ options_ ] )
190200Append data to the form. You can submit about any format (string, integer, boolean, buffer, etc.). However, Arrays are not supported and need to be turned into strings by the user.
191201``` javascript
192202var form = new FormData ();
@@ -206,18 +216,18 @@ form.append( 'my_file', fs.createReadStream('/foo/bar.jpg'), 'bar.jpg' );
206216form .append ( ' my_file' , fs .createReadStream (' /foo/bar.jpg' ), {filename: ' bar.jpg' , filesize: 1045 } );
207217```
208218
209- ##### _ Array_ getHeaders( [ ** Array** _ userHeaders_ ] )
219+ #### _ Array_ getHeaders( [ ** Array** _ userHeaders_ ] )
210220This method ads the correct ` content-type ` header to the provided array of ` userHeaders ` .
211221
212- ##### _ String_ getBoundary()
213- Return the boundary of the formData. A boundary consists of 26x ` - ` followed by 24 numbers
222+ #### _ String_ getBoundary()
223+ Return the boundary of the formData. A boundary consists of 26 ` - ` followed by 24 numbers
214224for example:
215225``` javascript
216226-------------------------- 515890814546601021194782
217227```
218228_ Note: The boundary must be unique and may not appear in the data._
219229
220- ##### _ Buffer_ getBuffer()
230+ #### _ Buffer_ getBuffer()
221231Return the full formdata request package, as a Buffer. You can insert this Buffer in e.g. Axios to send multipart data.
222232
223233``` javascript
@@ -231,12 +241,12 @@ axios.post( 'https://example.com/path/to/api',
231241 )
232242```
233243
234- ##### _ Integer_ getLengthSync()
244+ #### _ Integer_ getLengthSync()
235245Same as ` getLength ` but synchronous.
236246
237247_ Note: getLengthSync __ doesn't__ calculate streams length._
238248
239- ##### _ Integer_ getLength( function _ callback_ )
249+ #### _ Integer_ getLength( ** function** _ callback_ )
240250Returns the ` Content-Length ` async. The callback is used to handle errors and continue once the length has been calculated
241251``` javascript
242252this .getLength (function (err , length ) {
@@ -252,10 +262,10 @@ this.getLength(function(err, length) {
252262}.bind (this ));
253263```
254264
255- ##### _ boolean _ hasKnownLength()
265+ #### _ Boolean _ hasKnownLength()
256266Checks if the length of added values is known.
257267
258- ##### _ request _ submit( _ params_ , function _ callback_ )
268+ #### _ Request _ submit( _ params_ , ** function** _ callback_ )
259269Submit the form to a web application.
260270``` javascript
261271var form = new FormData ();
@@ -267,7 +277,7 @@ form.submit( 'http://example.com/', function(err, res) {
267277} );
268278```
269279
270- ##### _ String_ toString()
280+ #### _ String_ toString()
271281Returns the form data as a string. Don't use this if you are sending files or buffers, use ` getBuffer() ` instead.
272282
273283### Integration with other libraries
0 commit comments