title: Post object via CURL using PHP
body: <p>We are attempting to post to a rest API endpoint that requires a "POST object" within one of the keys. In javascript/jquery, this works fine. But, using CURL in PHP the endpoint doesn't receive the object (called "components") here:</p>
  
  <pre><code>    $ch = curl_init();
  
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  
      curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
      curl_setopt($ch, CURLOPT_URL, 'http://api.sitesitesite.com');
  
      $comps = array('slug' =&gt; "xyz",
                     'visble' =&gt; 1,
                     'color' =&gt; "xyz",
                     'shape' =&gt; "xyz",
                     'version' =&gt; "2",
              );
  
      $post_args = array();
      $post_args['components'] = $comps;
      $post_args['id'] = $id;
  
      curl_setopt($ch, CURLOPT_POSTFIELDS, $post_args);
  
      $result = curl_exec($ch);
  
      $http_status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
      curl_close($ch);
  </code></pre>