You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, is it possible to do a synchronous request using the superagent library?
I need to call a server during beforeunload event, but the request is cancelled by the browser. I suppose this is because it is asynchronous and the request don't start before the browser unload the page.
Using jquery it was possible. Something like $.ajaxSetup({ async: false })
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, is it possible to do a synchronous request using the superagent library?
I need to call a server during
beforeunload
event, but the request is cancelled by the browser. I suppose this is because it is asynchronous and the request don't start before the browser unload the page.Using jquery it was possible. Something like
$.ajaxSetup({ async: false })
Beta Was this translation helpful? Give feedback.
All reactions