Skip to content

Commit

Permalink
Update Route.php
Browse files Browse the repository at this point in the history
  • Loading branch information
Ginioo authored Oct 7, 2017
1 parent 5b0cf88 commit 60064c2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Route.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Application
* Route
*/
namespace Ginioo\Route;

Expand Down Expand Up @@ -56,11 +56,12 @@ public function getInputData()
{
$input = array();
if (isset($_SERVER['QUERY_STRING'])) {
parse_str($_SERVER['QUERY_STRING'], $input);
// parse_str($_SERVER['QUERY_STRING'], $input);
$input = $_GET;
}

if ($_SERVER['REQUEST_METHOD'] === self::CREATE) {
$input = $_POST;
$input = ($_POST) ? $_POST : json_decode(file_get_contents('php://input'));
}

return $input;
Expand Down

0 comments on commit 60064c2

Please sign in to comment.