diff --git a/types/node/http.d.ts b/types/node/http.d.ts index 0d7442888f..913cf98a37 100644 --- a/types/node/http.d.ts +++ b/types/node/http.d.ts @@ -159,6 +159,7 @@ declare module "http" { constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void); + readonly path: string; abort(): void; onSocket(socket: net.Socket): void; setTimeout(timeout: number, callback?: () => void): this; diff --git a/types/node/test/http.ts b/types/node/test/http.ts index 7c706e8f0d..462722a8ff 100644 --- a/types/node/test/http.ts +++ b/types/node/test/http.ts @@ -112,6 +112,9 @@ import * as net from 'net'; // event req.on('data', () => { }); + + // path + const path: string = req.path; } { diff --git a/types/node/v0/index.d.ts b/types/node/v0/index.d.ts index 1f29bbcc10..2190660451 100644 --- a/types/node/v0/index.d.ts +++ b/types/node/v0/index.d.ts @@ -531,6 +531,7 @@ declare module "http" { write(str: string, encoding?: string, cb?: Function): boolean; write(str: string, encoding?: string, fd?: string): boolean; + readonly path: string; write(chunk: any, encoding?: string): void; abort(): void; setTimeout(timeout: number, callback?: Function): void; diff --git a/types/node/v10/http.d.ts b/types/node/v10/http.d.ts index 5e1ebcc127..b55ab680cf 100644 --- a/types/node/v10/http.d.ts +++ b/types/node/v10/http.d.ts @@ -154,6 +154,7 @@ declare module "http" { constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void); + readonly path: string; abort(): void; onSocket(socket: net.Socket): void; setTimeout(timeout: number, callback?: () => void): this; diff --git a/types/node/v4/index.d.ts b/types/node/v4/index.d.ts index f52a8d01f8..279c3cefbf 100644 --- a/types/node/v4/index.d.ts +++ b/types/node/v4/index.d.ts @@ -785,6 +785,7 @@ declare module "http" { write(str: string, encoding?: string, cb?: Function): boolean; write(str: string, encoding?: string, fd?: string): boolean; + readonly path: string; write(chunk: any, encoding?: string): void; abort(): void; setTimeout(timeout: number, callback?: Function): void; diff --git a/types/node/v6/index.d.ts b/types/node/v6/index.d.ts index 6dd1ad1dc0..f4fa74291c 100644 --- a/types/node/v6/index.d.ts +++ b/types/node/v6/index.d.ts @@ -857,6 +857,7 @@ declare module "http" { write(str: string, encoding?: string, cb?: Function): boolean; write(str: string, encoding?: string, fd?: string): boolean; + readonly path: string; write(chunk: any, encoding?: string): void; abort(): void; setTimeout(timeout: number, callback?: Function): void; diff --git a/types/node/v7/index.d.ts b/types/node/v7/index.d.ts index a4fde30a97..2bf7056a42 100644 --- a/types/node/v7/index.d.ts +++ b/types/node/v7/index.d.ts @@ -854,6 +854,7 @@ declare module "http" { write(str: string, encoding?: string, cb?: Function): boolean; write(str: string, encoding?: string, fd?: string): boolean; + readonly path: string; write(chunk: any, encoding?: string): void; abort(): void; setTimeout(timeout: number, callback?: Function): void; diff --git a/types/node/v8/index.d.ts b/types/node/v8/index.d.ts index 1fac090367..b4d2d99a2c 100644 --- a/types/node/v8/index.d.ts +++ b/types/node/v8/index.d.ts @@ -1101,6 +1101,7 @@ declare module "http" { constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void); + readonly path: string; abort(): void; onSocket(socket: net.Socket): void; setTimeout(timeout: number, callback?: () => void): this; diff --git a/types/node/v9/index.d.ts b/types/node/v9/index.d.ts index 220afd9e60..7f0517a64c 100644 --- a/types/node/v9/index.d.ts +++ b/types/node/v9/index.d.ts @@ -1186,6 +1186,7 @@ declare module "http" { constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void); + readonly path: string; abort(): void; onSocket(socket: net.Socket): void; setTimeout(timeout: number, callback?: () => void): this;