title: How to perform a curl request in swift?
body: <p>I am trying to use an external API, which has an API request that is like the following. I am used to requests with just one url, but what do I do with the "H" and the "d" arguments? Should I include them in my url or </p>
  
  <pre><code>$ curl -X POST https://api.lucidtech.ai/v0/receipts \
    -H 'x-api-key: &lt;your api key&gt;' \
    -H 'Content-Type: application/json' \
    -d '{"documentId": "a50920e1-214b-4c46-9137-2c03f96aad56"}'
  </code></pre>
  
  <p>Currently I have the following code, but where do I place the API key and the document id in this code?</p>
  
  <pre><code>@IBAction func getScannedData(_ sender: Any){
      guard let url = URL(string: "https://api.lucidtech.ai/v0/receipts") else {return}
  
      let session = URLSession.shared
      session.dataTask(with: url) { (data, response, error) in
          if let response = response{
              print(response)
          }
  
  
  }
  </code></pre>