Created
November 5, 2018 23:45
-
-
Save erandirjunior/f40d5329c41c30d03995d2b7557e4d01 to your computer and use it in GitHub Desktop.
teste
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
require_once dirname(__DIR__).'/vendor/autoload.php'; | |
use \PlugRoute\PlugRoute; | |
$route = new PlugRoute(); | |
header("Access-Control-Allow-Origin: *"); | |
header("Access-Control-Allow-Methods: GET, POST, PUT, DELETE"); | |
//header("Access-Control-Allow-Headers: PUT"); | |
header("Access-Control-Allow-Headers: Content-Type"); | |
$route->any('/', function ($request) { | |
var_dump($request->all()); | |
}); | |
$route->any('/teste/{something}', function ($request) { | |
var_dump($request->getUrlBody()); | |
}); | |
$route->on(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment