backbone
backbone16mo ago

how to set request timeout in client

createProxyClient has no option about timeout like axios does. Just in one router request (query or mutate) use AbortController.But I do not want each router request to add this signal.It is boring.Any solutions?
4 Replies
Nick
Nick16mo ago
Why do you want a timeout?
backbone
backbone16mo ago
Sometimes client network speed is weak, I want cancel the requests
Nick
Nick16mo ago
But then the user will just be sat looking at a error'd out UI which could have eventually shown the data right? This is why enabling cancellation is more correct, then the client can abort if the user gives up loading the page
backbone
backbone16mo ago
Thank you.I will try it