From d7bd7663d79f5697b3f871999184ac968a0c597e Mon Sep 17 00:00:00 2001 From: Pablo Ois Lagarde
Date: Tue, 14 Feb 2017 21:52:04 -0300 Subject: [PATCH] [request] Support jsonReviver and jsonReplacer options --- request/index.d.ts | 2 ++ request/request-tests.ts | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/request/index.d.ts b/request/index.d.ts index edf31b9a9b..d576c82e3b 100644 --- a/request/index.d.ts +++ b/request/index.d.ts @@ -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; diff --git a/request/request-tests.ts b/request/request-tests.ts index b26149533b..1bd81760c8 100644 --- a/request/request-tests.ts +++ b/request/request-tests.ts @@ -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,