mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 15:27:05 +00:00
Merge pull request #13555 from sqren/patch-1
Request: Add RequestOptions to Response object
This commit is contained in:
Vendored
+6
-2
@@ -75,7 +75,7 @@ declare namespace request {
|
||||
|
||||
interface CoreOptions {
|
||||
baseUrl?: string;
|
||||
callback?: (error: any, response: http.IncomingMessage, body: any) => void;
|
||||
callback?: (error: any, response: RequestResponse, body: any) => void;
|
||||
jar?: any; // CookieJar
|
||||
formData?: any; // Object
|
||||
form?: any; // Object or string
|
||||
@@ -134,9 +134,13 @@ declare namespace request {
|
||||
export type Options = OptionsWithUri | OptionsWithUrl;
|
||||
|
||||
export interface RequestCallback {
|
||||
(error: any, response: http.IncomingMessage, body: any): void;
|
||||
(error: any, response: RequestResponse, body: any): void;
|
||||
}
|
||||
|
||||
export interface RequestResponse extends http.IncomingMessage {
|
||||
request: Options;
|
||||
}
|
||||
|
||||
export interface HttpArchiveRequest {
|
||||
url?: string;
|
||||
method?: string;
|
||||
|
||||
Reference in New Issue
Block a user