Skip to content

Commit

Permalink
Merge pull request #670 from depsimon/master
Browse files Browse the repository at this point in the history
Clone the response in fetch HTTP client
  • Loading branch information
smorimoto authored May 9, 2024
2 parents 7149b02 + bf47b5f commit 2f38757
Show file tree
Hide file tree
Showing 97 changed files with 97 additions and 97 deletions.
2 changes: 1 addition & 1 deletion templates/base/http-clients/fetch-http-client.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export class HttpClient<SecurityDataType = unknown> {
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
}
).then(async (response) => {
const r = response as HttpResponse<T, E>;
const r = response.clone() as HttpResponse<T, E>;
r.data = (null as unknown) as T;
r.error = (null as unknown) as E;

Expand Down
2 changes: 1 addition & 1 deletion tests/generated/v2.0/adafruit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ export class HttpClient<SecurityDataType = unknown> {
signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
}).then(async (response) => {
const r = response as HttpResponse<T, E>;
const r = response.clone() as HttpResponse<T, E>;
r.data = null as unknown as T;
r.error = null as unknown as E;

Expand Down
2 changes: 1 addition & 1 deletion tests/generated/v2.0/another-example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ export class HttpClient<SecurityDataType = unknown> {
signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
}).then(async (response) => {
const r = response as HttpResponse<T, E>;
const r = response.clone() as HttpResponse<T, E>;
r.data = null as unknown as T;
r.error = null as unknown as E;

Expand Down
2 changes: 1 addition & 1 deletion tests/generated/v2.0/another-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ export class HttpClient<SecurityDataType = unknown> {
signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
}).then(async (response) => {
const r = response as HttpResponse<T, E>;
const r = response.clone() as HttpResponse<T, E>;
r.data = null as unknown as T;
r.error = null as unknown as E;

Expand Down
2 changes: 1 addition & 1 deletion tests/generated/v2.0/api-with-examples.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export class HttpClient<SecurityDataType = unknown> {
signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
}).then(async (response) => {
const r = response as HttpResponse<T, E>;
const r = response.clone() as HttpResponse<T, E>;
r.data = null as unknown as T;
r.error = null as unknown as E;

Expand Down
2 changes: 1 addition & 1 deletion tests/generated/v2.0/authentiq.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ export class HttpClient<SecurityDataType = unknown> {
signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
}).then(async (response) => {
const r = response as HttpResponse<T, E>;
const r = response.clone() as HttpResponse<T, E>;
r.data = null as unknown as T;
r.error = null as unknown as E;

Expand Down
2 changes: 1 addition & 1 deletion tests/generated/v2.0/enums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ export class HttpClient<SecurityDataType = unknown> {
signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
}).then(async (response) => {
const r = response as HttpResponse<T, E>;
const r = response.clone() as HttpResponse<T, E>;
r.data = null as unknown as T;
r.error = null as unknown as E;

Expand Down
2 changes: 1 addition & 1 deletion tests/generated/v2.0/example1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ export class HttpClient<SecurityDataType = unknown> {
signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
}).then(async (response) => {
const r = response as HttpResponse<T, E>;
const r = response.clone() as HttpResponse<T, E>;
r.data = null as unknown as T;
r.error = null as unknown as E;

Expand Down
2 changes: 1 addition & 1 deletion tests/generated/v2.0/file-formdata-example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export class HttpClient<SecurityDataType = unknown> {
signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
}).then(async (response) => {
const r = response as HttpResponse<T, E>;
const r = response.clone() as HttpResponse<T, E>;
r.data = null as unknown as T;
r.error = null as unknown as E;

Expand Down
2 changes: 1 addition & 1 deletion tests/generated/v2.0/furkot-example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ export class HttpClient<SecurityDataType = unknown> {
signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
}).then(async (response) => {
const r = response as HttpResponse<T, E>;
const r = response.clone() as HttpResponse<T, E>;
r.data = null as unknown as T;
r.error = null as unknown as E;

Expand Down
2 changes: 1 addition & 1 deletion tests/generated/v2.0/giphy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ export class HttpClient<SecurityDataType = unknown> {
signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
}).then(async (response) => {
const r = response as HttpResponse<T, E>;
const r = response.clone() as HttpResponse<T, E>;
r.data = null as unknown as T;
r.error = null as unknown as E;

Expand Down
2 changes: 1 addition & 1 deletion tests/generated/v2.0/github-swagger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2087,7 +2087,7 @@ export class HttpClient<SecurityDataType = unknown> {
signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
}).then(async (response) => {
const r = response as HttpResponse<T, E>;
const r = response.clone() as HttpResponse<T, E>;
r.data = null as unknown as T;
r.error = null as unknown as E;

Expand Down
2 changes: 1 addition & 1 deletion tests/generated/v2.0/path-args.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export class HttpClient<SecurityDataType = unknown> {
signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
}).then(async (response) => {
const r = response as HttpResponse<T, E>;
const r = response.clone() as HttpResponse<T, E>;
r.data = null as unknown as T;
r.error = null as unknown as E;

Expand Down
2 changes: 1 addition & 1 deletion tests/generated/v2.0/petstore-expanded.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ export class HttpClient<SecurityDataType = unknown> {
signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
}).then(async (response) => {
const r = response as HttpResponse<T, E>;
const r = response.clone() as HttpResponse<T, E>;
r.data = null as unknown as T;
r.error = null as unknown as E;

Expand Down
2 changes: 1 addition & 1 deletion tests/generated/v2.0/petstore-minimal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ export class HttpClient<SecurityDataType = unknown> {
signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
}).then(async (response) => {
const r = response as HttpResponse<T, E>;
const r = response.clone() as HttpResponse<T, E>;
r.data = null as unknown as T;
r.error = null as unknown as E;

Expand Down
2 changes: 1 addition & 1 deletion tests/generated/v2.0/petstore-simple.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ export class HttpClient<SecurityDataType = unknown> {
signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
}).then(async (response) => {
const r = response as HttpResponse<T, E>;
const r = response.clone() as HttpResponse<T, E>;
r.data = null as unknown as T;
r.error = null as unknown as E;

Expand Down
2 changes: 1 addition & 1 deletion tests/generated/v2.0/petstore-swagger-io.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ export class HttpClient<SecurityDataType = unknown> {
signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
}).then(async (response) => {
const r = response as HttpResponse<T, E>;
const r = response.clone() as HttpResponse<T, E>;
r.data = null as unknown as T;
r.error = null as unknown as E;

Expand Down
2 changes: 1 addition & 1 deletion tests/generated/v2.0/petstore-with-external-docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ export class HttpClient<SecurityDataType = unknown> {
signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
}).then(async (response) => {
const r = response as HttpResponse<T, E>;
const r = response.clone() as HttpResponse<T, E>;
r.data = null as unknown as T;
r.error = null as unknown as E;

Expand Down
2 changes: 1 addition & 1 deletion tests/generated/v2.0/petstore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ export class HttpClient<SecurityDataType = unknown> {
signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
}).then(async (response) => {
const r = response as HttpResponse<T, E>;
const r = response.clone() as HttpResponse<T, E>;
r.data = null as unknown as T;
r.error = null as unknown as E;

Expand Down
2 changes: 1 addition & 1 deletion tests/generated/v2.0/query-path-param.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export class HttpClient<SecurityDataType = unknown> {
signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
}).then(async (response) => {
const r = response as HttpResponse<T, E>;
const r = response.clone() as HttpResponse<T, E>;
r.data = null as unknown as T;
r.error = null as unknown as E;

Expand Down
2 changes: 1 addition & 1 deletion tests/generated/v2.0/uber.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ export class HttpClient<SecurityDataType = unknown> {
signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
}).then(async (response) => {
const r = response as HttpResponse<T, E>;
const r = response.clone() as HttpResponse<T, E>;
r.data = null as unknown as T;
r.error = null as unknown as E;

Expand Down
2 changes: 1 addition & 1 deletion tests/generated/v3.0/additional-properties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ export class HttpClient<SecurityDataType = unknown> {
signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
}).then(async (response) => {
const r = response as HttpResponse<T, E>;
const r = response.clone() as HttpResponse<T, E>;
r.data = null as unknown as T;
r.error = null as unknown as E;

Expand Down
2 changes: 1 addition & 1 deletion tests/generated/v3.0/additional-properties2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ export class HttpClient<SecurityDataType = unknown> {
signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
}).then(async (response) => {
const r = response as HttpResponse<T, E>;
const r = response.clone() as HttpResponse<T, E>;
r.data = null as unknown as T;
r.error = null as unknown as E;

Expand Down
2 changes: 1 addition & 1 deletion tests/generated/v3.0/allof-example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ export class HttpClient<SecurityDataType = unknown> {
signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
}).then(async (response) => {
const r = response as HttpResponse<T, E>;
const r = response.clone() as HttpResponse<T, E>;
r.data = null as unknown as T;
r.error = null as unknown as E;

Expand Down
2 changes: 1 addition & 1 deletion tests/generated/v3.0/anyof-example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export class HttpClient<SecurityDataType = unknown> {
signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
}).then(async (response) => {
const r = response as HttpResponse<T, E>;
const r = response.clone() as HttpResponse<T, E>;
r.data = null as unknown as T;
r.error = null as unknown as E;

Expand Down
2 changes: 1 addition & 1 deletion tests/generated/v3.0/api-with-examples.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export class HttpClient<SecurityDataType = unknown> {
signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
}).then(async (response) => {
const r = response as HttpResponse<T, E>;
const r = response.clone() as HttpResponse<T, E>;
r.data = null as unknown as T;
r.error = null as unknown as E;

Expand Down
2 changes: 1 addition & 1 deletion tests/generated/v3.0/callback-example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export class HttpClient<SecurityDataType = unknown> {
signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
}).then(async (response) => {
const r = response as HttpResponse<T, E>;
const r = response.clone() as HttpResponse<T, E>;
r.data = null as unknown as T;
r.error = null as unknown as E;

Expand Down
2 changes: 1 addition & 1 deletion tests/generated/v3.0/components-responses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export class HttpClient<SecurityDataType = unknown> {
signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
}).then(async (response) => {
const r = response as HttpResponse<T, E>;
const r = response.clone() as HttpResponse<T, E>;
r.data = null as unknown as T;
r.error = null as unknown as E;

Expand Down
2 changes: 1 addition & 1 deletion tests/generated/v3.0/explode-param-3.0.1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ export class HttpClient<SecurityDataType = unknown> {
signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
}).then(async (response) => {
const r = response as HttpResponse<T, E>;
const r = response.clone() as HttpResponse<T, E>;
r.data = null as unknown as T;
r.error = null as unknown as E;

Expand Down
2 changes: 1 addition & 1 deletion tests/generated/v3.0/full-swagger-scheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8813,7 +8813,7 @@ export class HttpClient<SecurityDataType = unknown> {
signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
}).then(async (response) => {
const r = response as HttpResponse<T, E>;
const r = response.clone() as HttpResponse<T, E>;
r.data = null as unknown as T;
r.error = null as unknown as E;

Expand Down
2 changes: 1 addition & 1 deletion tests/generated/v3.0/link-example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ export class HttpClient<SecurityDataType = unknown> {
signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
}).then(async (response) => {
const r = response as HttpResponse<T, E>;
const r = response.clone() as HttpResponse<T, E>;
r.data = null as unknown as T;
r.error = null as unknown as E;

Expand Down
2 changes: 1 addition & 1 deletion tests/generated/v3.0/no-definitions-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ export class HttpClient<SecurityDataType = unknown> {
signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
}).then(async (response) => {
const r = response as HttpResponse<T, E>;
const r = response.clone() as HttpResponse<T, E>;
r.data = null as unknown as T;
r.error = null as unknown as E;

Expand Down
2 changes: 1 addition & 1 deletion tests/generated/v3.0/oneof-example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export class HttpClient<SecurityDataType = unknown> {
signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
}).then(async (response) => {
const r = response as HttpResponse<T, E>;
const r = response.clone() as HttpResponse<T, E>;
r.data = null as unknown as T;
r.error = null as unknown as E;

Expand Down
2 changes: 1 addition & 1 deletion tests/generated/v3.0/personal-api-example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ export class HttpClient<SecurityDataType = unknown> {
signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
}).then(async (response) => {
const r = response as HttpResponse<T, E>;
const r = response.clone() as HttpResponse<T, E>;
r.data = null as unknown as T;
r.error = null as unknown as E;

Expand Down
2 changes: 1 addition & 1 deletion tests/generated/v3.0/petstore-expanded.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ export class HttpClient<SecurityDataType = unknown> {
signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
}).then(async (response) => {
const r = response as HttpResponse<T, E>;
const r = response.clone() as HttpResponse<T, E>;
r.data = null as unknown as T;
r.error = null as unknown as E;

Expand Down
2 changes: 1 addition & 1 deletion tests/generated/v3.0/petstore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ export class HttpClient<SecurityDataType = unknown> {
signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
}).then(async (response) => {
const r = response as HttpResponse<T, E>;
const r = response.clone() as HttpResponse<T, E>;
r.data = null as unknown as T;
r.error = null as unknown as E;

Expand Down
2 changes: 1 addition & 1 deletion tests/generated/v3.0/recursive-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ export class HttpClient<SecurityDataType = unknown> {
signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
}).then(async (response) => {
const r = response as HttpResponse<T, E>;
const r = response.clone() as HttpResponse<T, E>;
r.data = null as unknown as T;
r.error = null as unknown as E;

Expand Down
2 changes: 1 addition & 1 deletion tests/generated/v3.0/responses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export class HttpClient<SecurityDataType = unknown> {
signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
}).then(async (response) => {
const r = response as HttpResponse<T, E>;
const r = response.clone() as HttpResponse<T, E>;
r.data = null as unknown as T;
r.error = null as unknown as E;

Expand Down
2 changes: 1 addition & 1 deletion tests/generated/v3.0/swaggerhub-template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export class HttpClient<SecurityDataType = unknown> {
signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
}).then(async (response) => {
const r = response as HttpResponse<T, E>;
const r = response.clone() as HttpResponse<T, E>;
r.data = null as unknown as T;
r.error = null as unknown as E;

Expand Down
2 changes: 1 addition & 1 deletion tests/generated/v3.0/tsoa-odd-types-3.0.2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ export class HttpClient<SecurityDataType = unknown> {
signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
}).then(async (response) => {
const r = response as HttpResponse<T, E>;
const r = response.clone() as HttpResponse<T, E>;
r.data = null as unknown as T;
r.error = null as unknown as E;

Expand Down
2 changes: 1 addition & 1 deletion tests/generated/v3.0/up-banking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,7 @@ export class HttpClient<SecurityDataType = unknown> {
signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
}).then(async (response) => {
const r = response as HttpResponse<T, E>;
const r = response.clone() as HttpResponse<T, E>;
r.data = null as unknown as T;
r.error = null as unknown as E;

Expand Down
2 changes: 1 addition & 1 deletion tests/generated/v3.0/uspto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ export class HttpClient<SecurityDataType = unknown> {
signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
}).then(async (response) => {
const r = response as HttpResponse<T, E>;
const r = response.clone() as HttpResponse<T, E>;
r.data = null as unknown as T;
r.error = null as unknown as E;

Expand Down
Loading

0 comments on commit 2f38757

Please sign in to comment.