Skip to content

Commit f4ca7f8

Browse files
committed
Fixed: getHeaders method signatures
1 parent 905f173 commit f4ca7f8

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

Readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ form.submit({
187187
### Methods
188188

189189
- [_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-)
190+
- [_Headers_ getHeaders( [**Headers** _userHeaders_] )](https://github.com/form-data/form-data#array-getheaders-array-userheaders-)
191191
- [_String_ getBoundary()](https://github.com/form-data/form-data#string-getboundary)
192192
- [_Buffer_ getBuffer()](https://github.com/form-data/form-data#buffer-getbuffer)
193193
- [_Integer_ getLengthSync()](https://github.com/form-data/form-data#integer-getlengthsync)
@@ -216,7 +216,7 @@ form.append( 'my_file', fs.createReadStream('/foo/bar.jpg'), 'bar.jpg' );
216216
form.append( 'my_file', fs.createReadStream('/foo/bar.jpg'), {filename: 'bar.jpg', contentType: 'image/jpeg', knownLength: 19806} );
217217
```
218218

219-
#### _Array_ getHeaders( [**Array** _userHeaders_] )
219+
#### _Headers_ getHeaders( [**Headers** _userHeaders_] )
220220
This method ads the correct `content-type` header to the provided array of `userHeaders`.
221221

222222
#### _String_ getBoundary()

index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export = FormData;
1111

1212
declare class FormData extends stream.Readable {
1313
append(key: string, value: any, options?: FormData.AppendOptions | string): void;
14-
getHeaders(): FormData.Headers;
14+
getHeaders(userHeaders: FormData.Headers): FormData.Headers;
1515
submit(
1616
params: string | FormData.SubmitOptions,
1717
callback?: (error: Error | undefined, response: http.IncomingMessage) => void

0 commit comments

Comments
 (0)