Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: This PR is a continuation of this #29471. All context you can find here: axios/axios#2073 (comment) axios/axios#2073 (comment) ## Changelog: [ANDROID] [FIXED] - change `connectTimeout` to `callTimeout` in OKHttp client Pull Request resolved: #38953 Test Plan: - Throttle internet connection (You can use GSM one) ``` import axios from "axios"; axios.get('https://jsonplaceholder.typicode.com/users', { timeout: 5000 }) .then(response => { console.log(response.data); }) .catch(error => { if (error.code === 'ECONNABORTED') { console.log('Request timed out'); } else { console.log(error.message); } }); ``` **Expected result** `Request timed out` should be visible in a console **Videos** Before https://github.com/facebook/react-native/assets/12766071/03a3d666-6a27-4d67-bc68-6bcf6e908e19 After https://github.com/facebook/react-native/assets/12766071/2650d02d-640c-43fe-b1e8-baeac78870f2 **Example URL** Branch: https://github.com/troZee/react-native/tree/fix/network-timeout-example Commit: troZee@e255e1a Reviewed By: mdvacca Differential Revision: D48414884 Pulled By: NickGerleman fbshipit-source-id: 86324601f7459c154b5fc879f8b773df4901f6e0
- Loading branch information