title: Swift : How I can try API call with POST having parameters and headers with URLSession?
body: <p>I found some pages but there were no clear contents.</p>
  <ol>
  <li><p>I have to use POST type of call</p>
  </li>
  <li><p>There is 3 needed parameters below.</p>
  </li>
  </ol>
  <p>a) name = source, type = String</p>
  <p>b) name = target, type = String</p>
  <p>c) name = text, type = String</p>
  <ol start="3">
  <li>The code below is the expected response of API call.</li>
  </ol>
  <p><a href="https://i.stack.imgur.com/XhVax.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XhVax.png" alt="enter image description here" /></a></p>
  <ol start="4">
  <li>These are the example of requests with headers</li>
  </ol>
  <p><a href="https://i.stack.imgur.com/8M2vy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8M2vy.png" alt="enter image description here" /></a></p>
  <p>I hope I want to know how I can put this data into the body of a struct for data.</p>
  <p>Thank you!</p>