-
-
Notifications
You must be signed in to change notification settings - Fork 50
Set Timeout for watting response #198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @lieutandat, |
@tgpetrov , Server (Java) receive request api of my team is not public right now, so I can not reproduce backend api.
mybackend (just sample in nodejs, not real java server, it might not work the same as java)
when the request completed upload, my server keep request running, but session still return with event errorHandler few seconds (about 15-20s) after upload file completed. I read your plugin code that its does not support timeout attribute. Could you help me to resolve this problem ? |
Hi @lieutandat, |
yep @tgpetrov , I trying with added
in setRequestOptions function and it run perfect. |
Hi @tgpetrov , how can I set retries max times for ios ? |
@lieutandat Actually, the 60 seconds timeout that I mentioned earlier seems to be coming from the NSURLSessionConfiguration that we are creating here. The iOS documentation notes here that any task created with this configuration are automatically retried when the request fails due to timeout. There is also a timeoutIntervalForResource, which allows for limiting the time for a specific resource. It seems like combining proper values of these two properties can allow you to limit the number of retries. |
Sorry about late reply @tgpetrov, I follow as you mention and it work fine. Thanks you very much! |
Hi @lieutandat where you have added this in plugin code or in nativescript javascript ( own service or component angular). |
@acharyaks90 I had to change in plugin code ( setRequestOptions function). This may breach licence law, I do not have more knowledge with Apache license, Does it allow to change plugin source code ? |
Will you help me? I'm trying to build two applications. One application requires to create a series of timers. Both applications must work when the app goes in the background, when the user locks the screen, or when the screen goes black. Could someone please confirm whether I'm aware that android might required a permission to be added into the manifest to do so. If they do but require extra work, could a link to a tutorial be included? Thank you |
Hi, I am working with nativescript for both iOS and Android, I tried to set timeout in request with your plugin, however it seem to be not apply at all. I got response code -1 after finish upload file to server few seconds while my server still running process ( will take about 5-6 minutes every request for return response). Could you help me this problem ? Thanks!
The text was updated successfully, but these errors were encountered: