我正在使用react-native
.
我坚持使用 POST 方法和/admin/customers.json
API 创建客户。当我调用这个 API 时,它给了我Unexpected token '>'
Postman 中的错误。
我正在传递每个必需的参数,但我未能获得输出。使用 GET 方法获取所有注册客户的详细信息,但如何在我的应用程序中使用 POST 方法进行注册是一个问题。
我还尝试在 PHP 中使用 cURL 和 (GET/POST) 方法,它给了我正确的结果。但是当我在 AJAX 中尝试时,这两种方法都不起作用并给出了这个错误:
Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access. The response had HTTP status code 404.
我从四天开始尝试,但仍然收到此错误。我也在 Shopify 论坛上问过,但没有得到任何答案。