@@ -186,7 +186,7 @@ form.submit({
186186
187187### Methods
188188
189- #####_ void_ append( ** String** _ field_ , ** Mixed** _ value_ [ , ** Mixed** _ options_ ] )
189+ ##### _ void_ append( ** String** _ field_ , ** Mixed** _ value_ [ , ** Mixed** _ options_ ] )
190190Append 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.
191191``` javascript
192192var form = new FormData ();
@@ -206,18 +206,18 @@ form.append( 'my_file', fs.createReadStream('/foo/bar.jpg'), 'bar.jpg' );
206206form .append ( ' my_file' , fs .createReadStream (' /foo/bar.jpg' ), {filename: ' bar.jpg' , filesize: 1045 } );
207207```
208208
209- #####_ Array_ getHeaders( [ ** Array** _ userHeaders_ ] )
209+ ##### _ Array_ getHeaders( [ ** Array** _ userHeaders_ ] )
210210This method ads the correct ` content-type ` header to the provided array of ` userHeaders ` .
211211
212- #####_ String_ getBoundary()
212+ ##### _ String_ getBoundary()
213213Return the boundary of the formData. A boundary consists of 26x ` - ` followed by 24 numbers
214214for example:
215215``` javascript
216216-------------------------- 515890814546601021194782
217217```
218218_ Note: The boundary must be unique and may not appear in the data._
219219
220- #####_ Buffer_ getBuffer()
220+ ##### _ Buffer_ getBuffer()
221221Return the full formdata request package, as a Buffer. You can insert this Buffer in e.g. Axios to send multipart data.
222222
223223``` javascript
@@ -231,12 +231,12 @@ axios.post( 'https://example.com/path/to/api',
231231 )
232232```
233233
234- #####_ Integer_ getLengthSync()
234+ ##### _ Integer_ getLengthSync()
235235Same as ` getLength ` but synchronous.
236236
237237_ Note: getLengthSync __ doesn't__ calculate streams length._
238238
239- #####_ Integer_ getLength( function _ callback_ )
239+ ##### _ Integer_ getLength( function _ callback_ )
240240Returns the ` Content-Length ` async. The callback is used to handle errors and continue once the length has been calculated
241241``` javascript
242242this .getLength (function (err , length ) {
@@ -252,10 +252,10 @@ this.getLength(function(err, length) {
252252}.bind (this ));
253253```
254254
255- #####_ boolean_ hasKnownLength()
255+ ##### _ boolean_ hasKnownLength()
256256Checks if the length of added values is known.
257257
258- #####_ request_ submit( _ params_ , function _ callback_ )
258+ ##### _ request_ submit( _ params_ , function _ callback_ )
259259Submit the form to a web application.
260260``` javascript
261261var form = new FormData ();
@@ -267,7 +267,7 @@ form.submit( 'http://example.com/', function(err, res) {
267267} );
268268```
269269
270- #####_ String_ toString()
270+ ##### _ String_ toString()
271271Returns the form data as a string. Don't use this if you are sending files or buffers, use ` getBuffer() ` instead.
272272
273273### Integration with other libraries
0 commit comments