title: How to Post API in R having header & json body
body: <p>How to call API Post in R</p>
  
  <p><strong>Request URL</strong>
  <a href="https://westus.api.cognitive.microsoft.com/text/analytics/v2.0/sentiment" rel="nofollow">https://westus.api.cognitive.microsoft.com/text/analytics/v2.0/sentiment</a></p>
  
  <p><strong>Request headers</strong>
  Ocp-Apim-Subscription-Key = some value &amp;
  Content-Type = application/json</p>
  
  <p><strong>Body</strong> application/json</p>
  
  <pre><code>{
    "documents": [
      {
        "language": "string",
        "id": "string",
        "text": "string"
      }
    ]
  }
  </code></pre>
  
  <p>Please help!!!</p>