feat(rest): use undici (#7747)

Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: ckohen <chaikohen@gmail.com>
This commit is contained in:
Khafra
2022-05-12 16:49:15 -04:00
committed by GitHub
parent 4515a1ea80
commit d1ec8c37ff
19 changed files with 964 additions and 605 deletions

View File

@@ -8,7 +8,6 @@ export class HTTPError extends Error {
public requestBody: RequestBody;
/**
* @param message The error message
* @param name The name of the error
* @param status The status code of the response
* @param method The method of the request that erred
@@ -16,14 +15,13 @@ export class HTTPError extends Error {
* @param bodyData The unparsed data for the request that errored
*/
public constructor(
message: string,
public override name: string,
public status: number,
public method: string,
public url: string,
bodyData: Pick<InternalRequest, 'files' | 'body'>,
) {
super(message);
super();
this.requestBody = { files: bodyData.files, json: bodyData.body };
}