我使用没有 ORM 的 api-platform。这是我的第三个 API。另外 2 个通过 Doctrine 链接到数据库。这个用于链接另外两个,因此不需要数据库。
我无法将搜索过滤器与 GET 请求一起使用,因为出现错误:
Call to a member function getClassMetadata() on null
Run Code Online (Sandbox Code Playgroud)
(因为我没有使用 ORM 映射对象...)
所以我使用 POST 请求,给我一个 201 HTTP 返回代码。
我可以得到 200 而不是这个 201(以满足 CORS...)吗?