Deliver only application/json in V3
in the past I have used Kirby very much as a pure API. This means that there were no normal PHP pages. Just a function that JSON publishes. But because I didn’t like the .json in the URL, I didn’t use...
View ArticleDeliver only application/json in V3
If all else fails, you could return the home page/whatever your have there from a route, e.g. 'routes' => [ [ 'pattern' => '/', 'action' => function() { return...
View ArticleDeliver only application/json in V3
In Kirby 3, you can set the response type like this in your templates: <?php $kirby->response()->json(); echo json_encode(['your' => 'data']); You can also set other types like this by...
View ArticleDeliver only application/json in V3
lukasbestle: It looks like we haven’t documented this anywhere yet. Or have I overlooked it, @texnixe? No, I don’t think so, I was missing it yesterday as well, but would have expected that if I...
View ArticleDeliver only application/json in V3
There’s an idea issue about that here. Read full topic
View Article