title: RAW data POST API using curl not working but executing in POSTMAN is okay
body: <p>I am a beginner in PHP and I am trying to put POST data using cURL. I tried in Postman my data and it returns</p>
  <p><a href="https://i.stack.imgur.com/yq56w.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yq56w.png" alt="enter image description here" /></a></p>
  <p>but when I execute this code below which I found here in StackOverflow <code>response</code> returns me a <code>307 Temporary Redirect</code>.</p>
  <pre><code>$ch = curl_init();
  
  curl_setopt($ch, CURLOPT_URL,            &quot;https://mycustomURL.com/api/v1/login&quot; );
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1 );
  curl_setopt($ch, CURLOPT_POST,           1 );
  curl_setopt($ch, CURLOPT_POSTFIELDS,     '{
      &quot;loginid&quot;:&quot;test&quot;,
      &quot;password&quot;:&quot;111111&quot;
  
  }' ); 
  curl_setopt($ch, CURLOPT_HTTPHEADER,     array('Content-Type: text/raw')); 
  
  $result=curl_exec ($ch);
  
  
  var_dump($result);
  </code></pre>
  <p>Can you help me what is the problem? Thank you.</p>