这可能是由于协议问题引起的,Back4app服务器认为您的请求使用了不支持的协议。您可以通过在请求头中添加协议让其工作,示例代码如下所示。
fetch(url, {headers: { 'Content-Type': 'application/json;charset=UTF-8', 'X-Parse-Application-Id': 'YourAppId', 'X-Parse-REST-API-Key': 'YourRestApiKey' 'X-Parse-Revocable-Session': 1, 'Connection': 'keep-alive', 'Access-Control-Allow-Origin': 'https://your-project.com', 'Access-Control-Allow-Headers': 'Content-Type, X-Parse-Application-Id, X-Parse-REST-API-Key'}}) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error(error));