- let formData = new FormData();
- formData.append("name","admin");
- formData.append("password","admin123");
- etch(url , {
- method: 'POST',
- headers: {},
- body: formData,
- ).then((response) => {
- if (response.ok) {
- return response.json();
- }
- ).then((json) => {
- alert(JSON.stringify(json));
- ).catch((error) => {
- console.error(error);
- );
React Native 中POST请求参数传递
最新推荐文章于 2023-06-22 11:21:05 发布