This code works on v2024, but doesn't work on v2025.
// server side
function Api_Action(RouteCollectorProxyInterface $app): void
{
$app->post('/test', function ($request, $response, $args) {
$val = $request->getParsedBody();
Log('test', ["request" => $val, "args" => $args]);
return $response->withJson(["request" => $val['name']]);
});
}
// client side
value = {
name: 'John',
age: 30
};
$.post(ew.getApiUrl(['test']), value, function(res) {
console.log(res);
});