Skip to content
Snippets Groups Projects
Commit c60305e0 authored by Thomas Kiehne's avatar Thomas Kiehne
Browse files

#3220431 HTTP method verbs fix

parent 06700eec
Branches
No related tags found
No related merge requests found
...@@ -72,7 +72,7 @@ class Canvas { ...@@ -72,7 +72,7 @@ class Canvas {
// per_page=100, we can get up to 100, but that's all; if there are more, // per_page=100, we can get up to 100, but that's all; if there are more,
// we need to get the "next" page, which is passed in the Link: attribute // we need to get the "next" page, which is passed in the Link: attribute
// in the response header. // in the response header.
if($method == 'get'){ if($method == 'GET'){
$data = json_decode($response->data,TRUE); $data = json_decode($response->data,TRUE);
$next = $this->_getNextURL($response); $next = $this->_getNextURL($response);
// We use a counter as a failsafe to this becoming an infinite loop. // We use a counter as a failsafe to this becoming an infinite loop.
...@@ -94,20 +94,20 @@ class Canvas { ...@@ -94,20 +94,20 @@ class Canvas {
} }
public function put(){ public function put(){
return $this->_getResponse('put'); return $this->_getResponse('PUT');
} }
public function post(){ public function post(){
return $this->_getResponse('post'); return $this->_getResponse('POST');
} }
public function get(){ public function get(){
$this->params['per_page'] = 100; $this->params['per_page'] = 100;
return $this->_getResponse('get'); return $this->_getResponse('GET');
} }
public function delete(){ public function delete(){
return $this->_getResponse('delete'); return $this->_getResponse('DELETE');
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment