Skip to content

Instantly share code, notes, and snippets.

@OleMchls
Created April 22, 2012 21:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save OleMchls/2467118 to your computer and use it in GitHub Desktop.
Save OleMchls/2467118 to your computer and use it in GitHub Desktop.
Blogpost: Testing a restful JSON API
[
{"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 */
]
<?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