Quantcast
Channel: Deliver only application/json in V3
Browsing latest articles
Browse All 6 View Live

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 Article



Deliver 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 Article

Deliver 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 Article

Image may be NSFW.
Clik here to view.

Deliver 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 Article

Deliver only application/json in V3

There’s an idea issue about that here. Read full topic

View Article


Deliver only application/json in V3

Ah, thanks, @lukasbestle. Read full topic

View Article
Browsing latest articles
Browse All 6 View Live


Latest Images