title: How to do an array in a cURL POST request from the command line
body: <p>I am trying to send a POST request given the following requirements. </p>
  
  <p>Guidelines</p>
  
  <p>The content type for the submission should be application/json</p>
  
  <p>The following is the structure of the body:</p>
  
  <p>Name: String</p>
  
  <p>PhoneNumber: String</p>
  
  <p>Email: String</p>
  
  <p>Position: String</p>
  
  <p>Urls: Array of objects containing the following properties</p>
  
  <p>Type: String</p>
  
  <p>Link: String</p>
  
  <p>All fields are required.
  At least one URL with the "Resume" type is required</p>
  
  <p>If your submission was successful, you will receive a HTTP 202 response</p>
  
  <p>I believe my syntax is correct for sending the data in JSON.</p>
  
  <p>I am having trouble with correctly coding the array.</p>
  
  <p>My code so far:</p>
  
  <pre><code>curl -g -i -H "Accept: application/json" -H "Content-Type:
       application/json" -X POST -d '{"Name":"data", 
       "PhoneNumber":"data", "Email":"data@gmail.com", 
       "Position":"data", "Url[]=GitHub", 
       "Url[]=github.com/data", "Url[]=Resume", 
       "Url[]=linkedin.com/in/data"}' 
       https://example
  </code></pre>
  
  <p>Here are the errors I am receiving:</p>
  
  <pre><code>curl: (3) Port number out of range
  curl: (6) Could not resolve host: gmail.com
  curl: (3) Illegal port number
  curl: (6) Could not resolve host: url[]=Github,
  curl: (6) Could not resolve host: url[]=github.com
  curl: (6) Could not resolve host: url[]=Resume,
  curl: (6) Could not resolve host: url[]=linkedin.com
  </code></pre>
  
  <p>Any help will be appreciated and please let me know if you need any more information.</p>