title: how to post append array in ionic and curl?
body: <p>how post data array in link</p>
  
  <p>data post:</p>
  
  <pre><code>{
       "text": "shandiz",
       "location": {
           "type": "Point",
           "coordinates": [
                1,1
            ]
        }
   }
  </code></pre>
  
  <p>step 1</p>
  
  <p>i coding posting:</p>
  
  <pre><code>let pData = new FormData();
  pData.append('text','shandiz');
  pData.append('location["type"]','Point');
  pData.append('location["coordinates"]','[1,1]');
  return this.http.post('https://map.ir/search?',pData);
  </code></pre>
  
  <h2>but error 400 (Bad Request)</h2>
  
  <p>step 2</p>
  
  <p>and send curl for testing</p>
  
  <pre><code>&lt;?php
  
  curlPost('https://map.ir/search', [
  
      'text' =&gt; 'shandiz',
      'location["type"]' =&gt;'Point',
      'location["coordinates"]'=&gt;'[1,1]',
  
  
  ]);
  
  function curlPost($url, $data) {
      $ch = curl_init($url);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
      curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);// برای خطای https 
      curl_setopt($ch, CURLOPT_HTTPHEADER, array('api-key:42b0dfbdc6174fea96e552e8097fb52f'));
      curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
      $response = curl_exec($ch);
      if (curl_error($ch)) {
          throw new \Exception(curl_error($ch));
      }
      curl_close($ch);
  
      // return $response;
      var_dump($response);
  }
  ?&gt;
  </code></pre>
  
  <p>but curl error</p>
  
  <p>how to post data array in step 1 , step 2?</p>
  
  <p>thanks </p>