我想使用 React Native 以原始文本格式发送此类数据。请帮助-
提交Qsubmit_form=1&form_noresubmit_code=1525265560&question=OKKKK NEW APPP&submit=
最佳答案
您可以对 GET 和 POST 请求使用 fetch API。 POST 请求示例:
fetch('https://mywebsite.com/endpoint/', {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({
firstParam: 'yourValue',
secondParam: 'yourOtherValue',
}),
});
您可以查看有关网络的官方文档here
关于reactjs - React native - 发布原始文本数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50135218/