Created
April 22, 2012 21:47
-
-
Save OleMchls/2467118 to your computer and use it in GitHub Desktop.
Blogpost: Testing a restful JSON API
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
[ | |
{"date": 1335129054}, /* and */ {"date": "1335129054"}, | |
/* would be ok for us and even (yeha it’s hard to say for me but) */ | |
{"date": "1335129054afd"} | |
/* would result in the same time with the internal php functions */ | |
] |
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 // this line is only needed for gist code highligthing -.-" | |
return new Response( | |
$this->get('api.response.json')->getItemList($items, $user), // content | |
200, // http status code | |
array('Content-Type' => 'application/json') // http headers | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment