To complete #4232, we have to be able to read the response headers of a request.
Therefore we can extend the default AxiosRequestConfig options with our own options.
interface CliRequestOptions extends AxiosRequestOptions {
fullResponse?: boolean;
}
Todo:
- Create new request options interface
- All our functions within the
Request class should accept this new interface instead of the AxiosRequestConfig
- Return the whole result when
fullResponse is true (like we do for streams).
|
if (resolve) { |
|
resolve(options.responseType === 'stream' ? res : res.data); |
|
} |
|
else { |
|
_resolve(options.responseType === 'stream' ? res : res.data); |
|
} |
To complete #4232, we have to be able to read the response headers of a request.
Therefore we can extend the default AxiosRequestConfig options with our own options.
Todo:
Requestclass should accept this new interface instead of theAxiosRequestConfigfullResponseis true (like we do for streams).cli-microsoft365/src/request.ts
Lines 180 to 185 in 539ef23