title: Can someone help me with POST method in Slim Framework?
body: <p>I can set a GET method in Slim to get data from my database but my problem is the POST method, i don't know how to use it correctly. I do some code like:</p>
  
  <pre><code>$app-&gt;post('/login',function() use ($app){
  
  $inputs = json_decode($app-&gt;request()-&gt;getBody());
  $result = json_encode($inputs);
  
  return $result;
  });
  </code></pre>
  
  <p>I wanna make a login function by POST method but this is just an example I want to show the data that have been sent in the body by json. I used Advanced Rest Client to test but the result is always "null".</p>
  
  <p>I'm new to Rest and Slim Framework too. Thanks for any helpful idea !</p>