How to Make HTTP Requests In React Native IOS application?
问题 fetch('http://119.9.52.47:3000/api/countries', { method: 'POST', headers: { 'Accept': 'application/json','Content-Type': 'application/json'}, }).then((response) => response.json()) .then((responseData) => { console.log(responseData); }) Here is my code . But that's not work. 回答1: you can try like this for send data to server(POST) let response = await fetch( 'http://your_url', { method: 'POST', headers: { 'Accept': 'application/json', 'Content-Type': 'application/json', }, body: JSON