title: Why my request POST swift to php, the content always to be key in PHP
body: <p>This is my first time, try swift to rest API PHP, i try request POST to PHP, but the key and value i request always to be key in php</p>
  
  <p>i had try in swift 5, php 7</p>
  
  <p>this is code in my swift:</p>
  
  <pre><code>func getTimeline(completion: @escaping (Result&lt;MainResponse&lt;String&gt;, Error&gt;) -&gt; Void) {
      var param: [String: Any] = [:]
      param["device_id"] = UIDevice.current.identifierForVendor?.uuidString
      param["X_SIGNATURE_API"] = "X-secure"
      param["name"] = "Rangga Leo"
  
      let url = URLConst.server
      HTTPRequest.shared.connect(url: url, params: param, model: String.self) { (result) in
          completion(result)
      }
  }
  </code></pre>
  
  <p>this is my URL ngrok if you want try : <a href="https://d9422a31.ngrok.io" rel="nofollow noreferrer">https://d9422a31.ngrok.io</a>
  anyway i have to create my own class to make dataTask more reuseable, and than this is simple response in my PHP :</p>
  
  <pre><code>    header("Content-Type: application/json");
  
  $data = [
      "POST" =&gt; $_POST,
      "device_id" =&gt; $_POST["device_id"]
  ];
  
  echo json_encode($data);
  </code></pre>
  
  <p>i expect the result show my device_id, but in case php given null value, event i debug $_POST, device_id is available but to be key in array PHP</p>
  
  <p>btw, this is result in my console </p>
  
  <pre><code>{
  "POST":{"{\"X_SIGNATURE_API\":\"X-secure\",
            \"name\":\"Rangga_Leo\",
            \"device_id\":\"C3E259A9-FBEB-4D65-9B6A-EC4F8BE89D95\"}":""},
  "device_id":null
  }
  </code></pre>