backbone
backbone2y 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
Nick2y ago
Why do you want a timeout?
backbone
backboneOP2y ago
Sometimes client network speed is weak, I want cancel the requests
Nick
Nick2y 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
backboneOP2y ago
Thank you.I will try it