Skip to content
This repository has been archived by the owner on Sep 26, 2022. It is now read-only.

Add Timeout Support to iOS #95

Closed
ryaa opened this issue Feb 10, 2021 · 3 comments · Fixed by #73
Closed

Add Timeout Support to iOS #95

ryaa opened this issue Feb 10, 2021 · 3 comments · Fixed by #73
Labels
bug Something isn't working

Comments

@ryaa
Copy link
Member

ryaa commented Feb 10, 2021

Is your feature request related to a problem? Please describe.
It seems that the timeout (both connectTimeout and readTimeout) is supported on Android however similar feature is not available for iOS platform.

Describe the solution you'd like
Support timeout for http requests for both, iOS and Android.

Describe alternatives you've considered
The cordova-plugin-advanced-http cordova plugin supports this feature https://github.com/silkimen/cordova-plugin-advanced-http#setrequesttimeout (even though there are some caveats - see silkimen/cordova-plugin-advanced-http#316)

Additional context
N/A

@thomasvidas thomasvidas added enhancement New feature or request bug Something isn't working and removed enhancement New feature or request labels Feb 15, 2021
@thomasvidas
Copy link
Contributor

Yes, it should work the same across both platforms. The timeout should be added to iOS

@thomasvidas thomasvidas changed the title Timeout support for iOS platform? Add Timeout Support to iOS Feb 15, 2021
@thomasvidas thomasvidas linked a pull request Feb 18, 2021 that will close this issue
17 tasks
@thomasvidas
Copy link
Contributor

Closing since 1.0.0-alpha.0 is on npm under @capacitor-community/http@next.

Since iOS and Android behave differently (iOS only having a single timeout), connectTimeout is prioritized over readTimeout. If neither are set, the default timeout of 60 seconds is set instead on iOS

@andreixk
Copy link

andreixk commented Apr 19, 2021

The plugin works, however, when running npx cap sync, I'm getting the error:
CocoaPods could not find compatible versions for pod "CapacitorCommunityHttp" it works fine when using the regular @capacitor-community/http version (which doesn't have timeout support on iOS).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants