title: DialogFlow (API.AI) REST with php
body: <p>I work on DialogFlow recently and I need to send a POST to my own web services.
  It's a Rest services work with Symfony et PHP.</p>
  
  <p>So I tried something and it didn't work. 
  In the tutorial it worked with Google Cloud, but I don't want to work with it.</p>
  
  <p>I changed the URL of Webhook with my own. I didn't change anything else in DialogFlow because it was good with google. There it is : </p>
  
  <pre><code>/**
   * @Rest\View()
   * @Rest\Post("/testDialogBot")
   */
  public function testDialogBotAction( Request $request )
  {
      $re = "Test reponse";
      $response = new Response(json_encode( array( "speech" =&gt; $re, "displayText" =&gt; $re )));
      $response-&gt;headers-&gt;set('Content-Type', 'application/json');
      return $response;
  
  }
  </code></pre>
  
  <p>The JSON of DialogFlow return : </p>
  
  <pre><code>"status": {
    "code": 206,
    "errorType": "partial_content",
    "errorDetails": "Webhook call failed. Error: Request timeout."
  },
  </code></pre>
  
  <p>I'm sure it can work, I do something bad probably.</p>
  
  <p>Thank's for help.</p>