Created
November 5, 2018 06:43
-
-
Save steveobbayi/e04bef0cc5c06b5b0c91eeaf28321f2a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$request_method = $_SERVER['REQUEST_METHOD']; | |
switch ($request_method) { | |
case 'GET': | |
//Handle GET Request here | |
break; | |
case 'POST': | |
//Here Handle POST Request here | |
break; | |
case 'PUT': | |
// Handle PUT Request here | |
break; | |
case 'PATCH': | |
// Handle PATCH Request here | |
break; | |
case 'DELETE': | |
//Here Handle DELETE Request | |
echo 'You are using '.$method.' Method'; | |
break; | |
case 'COPY': | |
// Handle COPY Request here | |
echo 'You are using '.$method.' Method'; | |
break; | |
case 'OPTIONS': | |
// Handle OPTIONS Request | |
break; | |
case 'LINK': | |
// Handle LINK Request here | |
break; | |
case 'UNLINK': | |
// Handle UNLINK Request here | |
break; | |
case 'PURGE': | |
//Here Handle PURGE Request here | |
break; | |
case 'LOCK': | |
// Handle LOCK Request here | |
break; | |
case 'UNLOCK': | |
//Here Handle UNLOCK Request here | |
break; | |
case 'PROPFIND': | |
// Handle PROPFIND Request here | |
break; | |
case 'VIEW': | |
//Here Handle VIEW Request | |
break; | |
Default: | |
// Handle default behavior | |
break; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment