So, I'm sending PATCH
requests to a server side, built with Lithium PHP Framework
, and in side the controller actions I see that the $request->data
is empty ... and I can't use the sent data.
What could be the problem? ...
(If I change the client side to send POST requests - then all is fine ... but the Lithium PHP Framework
rely on the request type ... and so it breaks if the request type is PATCH
? ...)
What version of Lithium is used? Lithium didn't support PATCH method until this commit . See how support for PATCH was added in that commit so it should populate $request->data now.
Try to update to the most recent version of Lithium or just apply that patch to check if it solves the problem.
What web server are you using ? I had the same problem with li3_server
library ( https://github.com/daschl/li3_server ). I changed to nginx
and it worked fine.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.