Skip to content

Instantly share code, notes, and snippets.

@ludofleury
Created August 22, 2012 12:53
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 ludofleury/3425325 to your computer and use it in GitHub Desktop.
Save ludofleury/3425325 to your computer and use it in GitHub Desktop.
<?php
$controllers->post('/{myModel}/items', function (Model\myModel $myModel, Request $request) use ($app) {
//...
)}
->bind('mymodel_create')
->accept('url-encode')
->accept('json')
->contentType('kutio+xml', array('*/*', 'application/*', 'application/vnd.kutio+xml'))
->contentType('json', array('application/json', 'application/x-json'))
->convert('myModel', $providers['myModel'])
->security('OAuth');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment