@@ -102,31 +102,31 @@ public function stopImpersonateUser(): void
102102 */
103103 public function requestGet (string $ path ): bool
104104 {
105- return $ this ->runRequest ('get ' , $ path );
105+ return $ this ->runRequest ('GET ' , $ path );
106106 }
107107
108108 /**
109109 * Create and send a POST request.
110110 */
111111 public function requestPost (string $ path , string $ body ): bool
112112 {
113- return $ this ->runRequest ('post ' , $ path , $ body );
113+ return $ this ->runRequest ('POST ' , $ path , $ body );
114114 }
115115
116116 /**
117117 * Create and send a PUT request.
118118 */
119119 public function requestPut (string $ path , string $ body ): bool
120120 {
121- return $ this ->runRequest ('put ' , $ path , $ body );
121+ return $ this ->runRequest ('PUT ' , $ path , $ body );
122122 }
123123
124124 /**
125125 * Create and send a DELETE request.
126126 */
127127 public function requestDelete (string $ path ): bool
128128 {
129- return $ this ->runRequest ('delete ' , $ path );
129+ return $ this ->runRequest ('DELETE ' , $ path );
130130 }
131131
132132 /**
@@ -295,7 +295,7 @@ private function createCurl(string $method, string $path, string $body = '', str
295295 unset($ curlOptions [CURLOPT_POST ]);
296296 unset($ curlOptions [CURLOPT_POSTFIELDS ]);
297297 switch ($ method ) {
298- case 'post ' :
298+ case 'POST ' :
299299 $ curlOptions [CURLOPT_POST ] = 1 ;
300300 if ($ this ->isUploadCall ($ path ) && $ this ->isValidFilePath ($ body )) {
301301 @trigger_error ('Uploading an attachment by filepath is deprecated, use file_get_contents() to upload the file content instead. ' , E_USER_DEPRECATED );
@@ -311,13 +311,13 @@ private function createCurl(string $method, string $path, string $body = '', str
311311 $ curlOptions [CURLOPT_POSTFIELDS ] = $ body ;
312312 }
313313 break ;
314- case 'put ' :
314+ case 'PUT ' :
315315 $ curlOptions [CURLOPT_CUSTOMREQUEST ] = 'PUT ' ;
316316 if ($ body !== '' ) {
317317 $ curlOptions [CURLOPT_POSTFIELDS ] = $ body ;
318318 }
319319 break ;
320- case 'delete ' :
320+ case 'DELETE ' :
321321 $ curlOptions [CURLOPT_CUSTOMREQUEST ] = 'DELETE ' ;
322322 break ;
323323 default : // GET
0 commit comments