Merge pull request #17283 from newraina/fix-append-param

fix fetch.io append param
This commit is contained in:
Nathan Shively-Sanders
2017-06-20 12:51:45 -07:00
committed by GitHub
2 changed files with 9 additions and 2 deletions

View File

@@ -57,3 +57,8 @@ request
.post('')
.send({})
.json();
request
.post('')
.append('key', 'value')
.append({key: 'value'});

View File

@@ -1,4 +1,4 @@
// Type definitions for fetch.io 3.1
// Type definitions for fetch.io 4.0
// Project: https://github.com/haoxins/fetch.io
// Definitions by: newraina <https://github.com/newraina>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -95,7 +95,9 @@ export class Request {
/**
* ppend formData
*/
append(key: string, value: string): this;
append(key: string, value: any): this;
append(object: {[key: string]: any}): this;
/**
* Get Response directly