Skip to content

Commit ac99885

Browse files
depsimonsmorimoto
authored andcommitted
fix: clone the response in fetch HTTP client
1 parent d860411 commit ac99885

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/base/http-clients/fetch-http-client.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ export class HttpClient<SecurityDataType = unknown> {
189189
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
190190
}
191191
).then(async (response) => {
192-
const r = response as HttpResponse<T, E>;
192+
const r = response.clone() as HttpResponse<T, E>;
193193
r.data = (null as unknown) as T;
194194
r.error = (null as unknown) as E;
195195

0 commit comments

Comments
 (0)