Skip to content

Enhancement: Create our own AxiosRequestConfig interface #4277

@milanholemans

Description

@milanholemans

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);
    }

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions