API: set request method for registered urls

This commit is contained in:
Bart Visscher 2012-07-31 22:34:35 +02:00
parent 006b127da4
commit 71918a820f
1 changed files with 1 additions and 0 deletions

View File

@ -43,6 +43,7 @@ class OC_API {
$name = str_replace(array('/', '{', '}'), '_', $name);
if(!isset(self::$actions[$name])){
OC::$router->create($name, $url.'.{_format}')
->method($method)
->defaults(array('_format' => 'xml'))
->requirements(array('_format' => 'xml|json'))
->action('OC_API', 'call');