From c60305e0281f52ac75e1082f1cbb634989f96afc Mon Sep 17 00:00:00 2001
From: Thomas Kiehne <tkiehne@gmx.us>
Date: Thu, 27 Jul 2023 15:00:25 -0700
Subject: [PATCH] #3220431 HTTP method verbs fix

---
 includes/canvas_api.inc | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/includes/canvas_api.inc b/includes/canvas_api.inc
index 6d6fb8b..f1cf170 100755
--- a/includes/canvas_api.inc
+++ b/includes/canvas_api.inc
@@ -72,7 +72,7 @@ class Canvas {
 		// 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
 		// in the response header.
-		if($method == 'get'){
+		if($method == 'GET'){
 			$data = json_decode($response->data,TRUE);
 			$next = $this->_getNextURL($response);
 			// We use a counter as a failsafe to this becoming an infinite loop.
@@ -94,20 +94,20 @@ class Canvas {
   }
 
   public function put(){
-    return $this->_getResponse('put');
+    return $this->_getResponse('PUT');
   }
   
   public function post(){
-    return $this->_getResponse('post');
+    return $this->_getResponse('POST');
   }
   
   public function get(){
     $this->params['per_page'] = 100;
-    return $this->_getResponse('get');
+    return $this->_getResponse('GET');
   }
 
   public function delete(){
-    return $this->_getResponse('delete');
+    return $this->_getResponse('DELETE');
   }
   
   /**
-- 
GitLab