【发布时间】:2019-01-24 06:46:14
【问题描述】:
如何在 React Native 中获取带有方括号的正文/查询的 POST?
喜欢:
user[email]
这是我的代码:
fetch('url/users/sign_in/', {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({
'user[email]': this.state.email,
'user[password]: this.state.password
})
});
【问题讨论】:
标签: react-native