Skip to content
Snippets Groups Projects
Commit 71918a82 authored by Bart Visscher's avatar Bart Visscher
Browse files

API: set request method for registered urls

parent 006b127d
No related branches found
No related tags found
No related merge requests found
......@@ -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');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment