Closed 9M6 closed 12 months ago
Quick notice: Please do not use the reactive upload handler useConfide
, but $confide
for simple upload handling instead. See the docs.
Can you please provide a minimal reproduction?
Hey @johannschopplich the problem is that the function in there is a simple wrapper of the Generated functions from API Party:
const cookie = useCookie("auth_c4dm");
return useDMData<T>(
url,
Object.assign(
{
headers: {
Authorization: `Token ${cookie.value}`,
},
},
config,
),
);
As for the reproduction, I'm not sure what to provide? Like its not a bug, but more like how the library behaves. I moved that logic with Axios and everything works smooth as butter.
Nuxt API Party will always generate two composables. In your case, useConfide
and $confide
. Please use the latter one for data sending. It won't cache results and is inteded for simple upload cases you currently use Axios for. As state earlier, please read the docs.
Please use a template below to create a minimal reproduction 👉 https://stackblitz.com/github/nuxt/starter/tree/v3-stackblitz 👉 https://codesandbox.io/p/github/nuxt/starter/v3-codesandbox
Without a reproduction, I won't be able to investigate the issue. Please open a separate issue once you found the time to create a reproducible example. Thanks in advance!
Environment
Operating System: Darwin
Reproduction
Not applicable.
Describe the bug
When I'm using the above function which is a wrapper and abstraction on top of the NuxtApiParty, the UI glitches and takes a bit of time to upload, in some cases crashes the browser.
https://github.com/johannschopplich/nuxt-api-party/assets/61775571/c0974eb7-71ed-42c6-ad0a-91ea4a02ea54
On the other hand, I have done another implementation with Axios and a proxy URL with
routeRules
, and that works completely fine, no glitches, nothing.https://github.com/johannschopplich/nuxt-api-party/assets/61775571/c81d55c0-42d9-40e6-bd17-f7e067b9d56d
Additional context
No response
Logs
No response