title: RabbitMQ HTTP API returning 401 (Unauthorized)
body: <p>Using RabbitMQ localhost and trying to use his API.. when i Call from postman it's work fine.</p>
  
  <p><a href="https://i.stack.imgur.com/bwV7E.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bwV7E.png" alt="enter image description here"></a></p>
  
  <p>But i'm trying to use this API inside my app code and I'm getting 401 error:</p>
  
  <pre><code>const test = {
    count: 5,
    ackmode: 'ack_requeue_true',
    encoding: 'auto',
    truncate: 50000
  }
  
    testPost() {
      fetch('http://localhost:15672/api/queues/%2F/QA.MOBILE/get', {
        method: 'post',
        mode: 'no-cors',
        body: JSON.stringify(test),
        headers: {Authorization: 'Basic ' + btoa('guest:guest'), Accept: 'application/json', 'Content-Type': 'application/json'}
      });
    }
  </code></pre>
  
  <p>POST <a href="http://localhost:15672/api/queues/%2F/QA.MOBILE/get" rel="nofollow noreferrer">http://localhost:15672/api/queues/%2F/QA.MOBILE/get</a> net::ERR_ABORTED 401 (Unauthorized)</p>
  
  <p>I'm missing something?</p>
  
  <p>thanks</p>