title: Laravel ServerException in RequestException.php when receiving simple JSON request
body: <p>I'm using Laravel 5 framework to communicate with the manufacturer, and I'm struggling in receiving the callback:</p>
  
  <p>Here are the routes (set them both, just to test):</p>
  
  <pre><code>Route::post('/callback', 'PrintController@callback');
  Route::get('/callback', 'PrintController@callback');
  </code></pre>
  
  <p>And the simple method in controller:</p>
  
  <pre><code>public function callback(Request $request)
  {
      var_dump( $request );
      //Storage::put('request.txt', $request);
  }
  </code></pre>
  
  <p>It works fine, if I open the site manually ( meaning, it dump the request and later create the request file ) , but when  call like like this:</p>
  
  <pre><code>/**
   * Test callback option
   */
  public function testCallback()
  {
      $callback_url = 'http://project.dev/callback';
  
      // Prepare response
      $response = array(
          'time' =&gt; -microtime(true),
      );
  
      $data = [
          "id" =&gt; 907,
          "current_state" =&gt; "Shipped",
          "merchant_sku" =&gt; "BST123",
          "ordered_on_date" =&gt; "2015-08-16T00:00:00+0200",
          "ship_by_date" =&gt; "2015-08-21T00:00:00+0200",
          "shipping_carrier" =&gt; "USPS",
          "shipping_tracking" =&gt; "9499907123456123456781",
      ];
  
      try {
          $result = Guzzle::post($callback_url, [
              'verify' =&gt; false,
              'headers' =&gt; [
                  'Content-Type' =&gt; 'application/json',
              ],
              'json' =&gt; $data,
          ]);
          $body = json_decode($result-&gt;getBody(), true);
  
          // Fill response
          if ($body['success'] == true) {
              $response['success'] = true;
              $response['order_id'] = $body['work_order_id'];
          } else {
              $response['success'] = false;
          }
      } catch (Exception $e) {
          // Set error
          $response['success'] = false;
          $response['message'] = $e-&gt;getMessage();
      }
  
      // Save execution time
      $response['time'] += microtime(true);
      $response['time'] = round(abs($response['time']), 4);
  
      return $response;
  }
  </code></pre>
  
  <p>I get this error message:</p>
  
  <pre><code>ServerException in RequestException.php line 107:
  Server error: `POST http://project.dev/callback` resulted in a `500 Internal Server Error` response:
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta name="robots" content="noindex,nofollow" /&gt;
  &lt;style&gt;
  (truncated...)
  </code></pre>
  
  <p><em>Edit:</em> The only errorlike message I get in <code>php_error.log</code> is: </p>
  
  <pre><code>[09-May-2016 12:24:20 UTC] PHP Deprecated:  Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. in Unknown on line 0
  </code></pre>
  
  <p>Any ideas what I'm doing wrong and/or how to debug and fix this?</p>
  
  <p>By the way: The communication happens between two laravel frameworks in the save machine, meaning, it's <code>site.dev</code> sending request to <code>project.dev</code>.</p>
  
  <p><em>EDIT:</em> Found this in laravel error log when receiveing POST. It works find with GET.</p>
  
  <pre><code>[2016-05-09 15:21:25] local.ERROR: exception 'Illuminate\Session\TokenMismatchException' in D:\project.dev\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\VerifyCsrfToken.php:67
  </code></pre>
  
  <p>Why does Laravel even care about this, since I'm sending request with <code>'verify' =&gt; false</code> ?</p>