title: How to fix 401 after attempt to override existing POST?
body: <p>I'm receiving 401 error when trying to override existing POST with new data. It throws 401. As I could observe it is xmlhttprequest. Code and screen of chrome console:</p>
  
  <p><a href="https://i.stack.imgur.com/dB46s.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dB46s.png" alt="enter image description here"></a></p>
  
  <pre><code>const send = function(method,url,data){
      const promise = new Promise(function(resolve,reject){
          const xhr = new XMLHttpRequest();
          xhr.open(method, url)
          xhr.responseType = "json"
          xhr.setRequestHeader("Content-type", "application/json");
          xhr.onload = function(){
              resolve(xhr.response)
          };
          xhr.send(JSON.stringify(data))
      });
      return promise;
  };
  
  const final = function(){
      send("POST", "https://www.thecrims.com/api/v1/input",{
          email:"yes",
          password:"no"
      }).then(function(responseData){
          console.log(responseData)
      });
  };
  </code></pre>