Timeout is not being respected in xhr-pollyfill.js file
Closed this issue · 5 comments
Hi I am trying to set a timeout for my api call which take quite longer to return results as below,
$.ajax({
url:url,
type: "post",
timeout: 12000,
data:data,
Success"
..
}
but it is not being retained or coming as undefined inside xhr-pollyfill.js file and timeout is not being set for the ajax api call.
please if anyone has solution let me know, thanks in advance.
@ravikumarevry Do you have a sample app to showcase this issue?
@manish27 No, Its happenning in my main application, I do not have a sample
@ravikumarevry I am seeing similar behavior on iOS 14.5+ devices. After debugging, I've found that the plugin itself is handling the timeout correctly (and, if I'm reading the docs correctly, the underlying iOS networking API has a default timeout of 30 seconds, which is not overridden by the plugin), but the timeout event never seems to bubble up beyond the polyfilled XmlHttpRequest functions (the last bit of code that I can debug before a very long timeout interval is the window.nativeXHRResponse
polyfilled function that is attached to the window object).
@manish27 No, Its happenning in my main application, I do not have a sample
@ravikumarevry Can you create a sample cordova ios app to showcase this issue and share it with us.
Please mention version details of the platform too.
Reference for creating cordova ios app : https://cordova.apache.org/docs/en/latest/guide/cli/index.html
Closing the issue due to lack of response.