title: Getting No 'Access-Control-Allow-Origin' header is present on the requested resource" in postman
body: <p>I am writing a pre-request script in postman to execute. The code looks like below</p>
  
  <pre><code>var settings={
  "url":environment.url+"/fullendpoint",
  "method":"post",
  "data":"{'Username':'username','Password':'password'}",
  "Content-Type":"application/json",
  };
  
  $.ajax(settings).done(function (response){
      console.log(response)
  });
  </code></pre>
  
  <p>Executing above, I am getting error as "Response to preflight request doesn't pass access control check: </p>
  
  <blockquote>
    <p>No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. The response had HTTP status code 405.</p>
  </blockquote>
  
  <p>Above method is basically to login the user to the application and capture the response cookies and headers so that it can be used for the actual api call. </p>