Please sign in to comment.
Implement XHR timeout for Android and IOS natively.
Summary: Opening this in a separate PR but the discussion can be viewed on #4832. Basically, this is a native implementation and is a bit more elegant. The consensus on my previous PR was that it should be done natively rather than in JS. There's now no maximum valid timeout value and a timeout of 0 will never time out. ontimeout isn't implemented (yet) in this PR. cc nicklockwood ide philikon Closes #5038 Reviewed By: svcscm Differential Revision: D2838743 Pulled By: nicklockwood fb-gh-sync-id: 774f864ac35082bf522f7665f4311bd3affbe82c
- Loading branch information...
Showing with 38 additions and 18 deletions.
- +3 −2 Libraries/Network/RCTNetworking.android.js
- +1 −1 Libraries/Network/RCTNetworking.m
- +3 −3 Libraries/Network/XMLHttpRequest.android.js
- +2 −1 Libraries/Network/XMLHttpRequest.ios.js
- +4 −2 Libraries/Network/XMLHttpRequestBase.js
- +9 −1 ReactAndroid/src/main/java/com/facebook/react/modules/network/NetworkingModule.java
- +16 −8 ReactAndroid/src/test/java/com/facebook/react/modules/network/NetworkingModuleTest.java