Created
July 23, 2014 04:30
-
-
Save t-cyrill/bcb5c7eaa5665d95abae to your computer and use it in GitHub Desktop.
Klein.php sample2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header('Content-type: application/json'); | |
$klein->respond('GET', '/users/[:id].[json:format]?', function ($req, $res, $serv, $app) { | |
$id = $req->param('id'); | |
return json_encode(['id' => $id]); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment