@@ -75,6 +75,8 @@ export interface RequestResponse {
7575 readonly data ?: any ;
7676 /** For multipart responses, the payloads of individual parts. */
7777 readonly multipart ?: Buffer [ ] ;
78+ /** Optional request config used to send this request. */
79+ readonly config ?: any ;
7880 /**
7981 * Indicates if the response content is JSON-formatted or not. If true, data field can be used
8082 * to retrieve the content as a parsed JSON object.
@@ -127,6 +129,7 @@ class DefaultRequestResponse implements RequestResponse {
127129 public readonly status : number ;
128130 public readonly headers : any ;
129131 public readonly text ?: string ;
132+ public readonly config ?: RequestConfig ;
130133
131134 private readonly parsedData : any ;
132135 private readonly parseError : Error ;
@@ -139,6 +142,7 @@ class DefaultRequestResponse implements RequestResponse {
139142 this . status = resp . status ;
140143 this . headers = resp . headers ;
141144 this . text = resp . data ;
145+ this . config = resp . config ;
142146 try {
143147 if ( ! resp . data ) {
144148 throw new FirebaseAppError ( AppErrorCodes . INTERNAL_ERROR , 'HTTP response missing data.' ) ;
@@ -177,11 +181,13 @@ class MultipartRequestResponse implements RequestResponse {
177181 public readonly status : number ;
178182 public readonly headers : any ;
179183 public readonly multipart ?: Buffer [ ] ;
184+ public readonly config ?: any ;
180185
181186 constructor ( resp : LowLevelResponse ) {
182187 this . status = resp . status ;
183188 this . headers = resp . headers ;
184189 this . multipart = resp . multipart ;
190+ this . config = resp . config ;
185191 }
186192
187193 get text ( ) : string {
0 commit comments