[request] Support jsonReviver and jsonReplacer options

This commit is contained in:
Pablo Ois Lagarde
2017-02-14 21:52:04 -03:00
parent e79e2e64a6
commit d7bd7663d7
2 changed files with 8 additions and 0 deletions

2
request/index.d.ts vendored
View File

@@ -91,6 +91,8 @@ declare namespace request {
qsStringifyOptions?: any;
qsParseOptions?: any;
json?: any;
jsonReviver?: (key: string, value: any) => any;
jsonReplacer?: (key: string, value: any) => any;
multipart?: RequestPart[] | Multipart;
agent?: http.Agent | https.Agent;
agentOptions?: any;

View File

@@ -91,6 +91,12 @@ var options: request.Options = {
aws: aws,
qs: obj,
json: value,
jsonReviver: (key: string, value: any) => {
},
jsonReplacer: (key: string, value: any) => {
},
multipart: value,
agent: new http.Agent(),
agentOptions: value,