First of all, thank you for you excellent library.
I wanted to let you know I found an issue while using a custom post middleware in my autogenerated client. It seems that the autogenerated runtime.ts file is passing a cloned response, which can lead to timeout issues when dealing with large responses.
This is part of the code of the autogenerated runtime.ts file that I updated:
for (const middleware of this.middleware) {
if (middleware.post) {
response = await middleware.post({
fetch: this.fetchApi,
url: fetchParams.url,
init: fetchParams.init,
response: response, // response.clone() method was deleted because it doesn't support large responses
}) || response;
}
}
I'm wondering if this change may cause unexpected problems and if you have found any better approach for this.
Thank you for your attention to this matter. Looking forward to your insights.
Hi all,
First of all, thank you for you excellent library.
I wanted to let you know I found an issue while using a custom post middleware in my autogenerated client. It seems that the autogenerated
runtime.ts
file is passing a cloned response, which can lead to timeout issues when dealing with large responses.This is part of the code of the autogenerated
runtime.ts
file that I updated:I'm wondering if this change may cause unexpected problems and if you have found any better approach for this.
Thank you for your attention to this matter. Looking forward to your insights.