mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-17 03:24:15 +08:00
@types/nock Multiple set cookie. (#22921)
This commit is contained in:
committed by
Wesley Wigham
parent
ce95a260e0
commit
1df22278c5
3
types/nock/index.d.ts
vendored
3
types/nock/index.d.ts
vendored
@@ -4,6 +4,7 @@
|
||||
// Horiuchi_H <https://github.com/horiuchi>
|
||||
// afharo <https://github.com/afharo>
|
||||
// Matt R. Wilson <https://github.com/mastermatt>
|
||||
// Garanzha Dmitriy <https://github.com/damour>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
@@ -34,7 +35,7 @@ declare namespace nock {
|
||||
|
||||
export var back: NockBack;
|
||||
|
||||
type HttpHeaders = { [key: string]: string | { (req: any, res: any, body: string): any; }; };
|
||||
type HttpHeaders = { [key: string]: string | string[] | { (req: any, res: any, body: string): any; }; };
|
||||
type InterceptFunction = (
|
||||
uri: string | RegExp | { (uri: string): boolean; },
|
||||
requestBody?: string | RegExp | { (body: any): boolean; } | any,
|
||||
|
||||
@@ -368,6 +368,12 @@ var scope = nock('http://www.headdy.com')
|
||||
'X-My-Headers': 'My Header value'
|
||||
});
|
||||
|
||||
var scope = nock('http://www.headdy.com')
|
||||
.get('/')
|
||||
.reply(200, 'Hello World!', {
|
||||
'X-My-Headers': ['My Header value 1', 'My Header value 2']
|
||||
});
|
||||
|
||||
var scope = nock('http://www.headdy.com')
|
||||
.get('/')
|
||||
.reply(200, 'Hello World!', {
|
||||
|
||||
Reference in New Issue
Block a user