title: Making a simple POST request with the pastebin API
body: <p>I was wondering how I would be able to make a post request to pastebin.com. They have an easy to understand <a href="https://pastebin.com/api#2" rel="nofollow noreferrer">API documentation</a>, but whenever I run a simple POST request I always get <code>Bad API request, invalid api_option</code>.</p>
  
  <p>I'm using the bear minimum required to make the request, I'm not sure what I could be doing wrong.</p>
  
  <p><code>var request = new XMLHttpRequest;
  request.open("POST", "https://pastebin.com/api/api_post.php?api_dev_key=mykey&amp;api_option=paste&amp;api_paste_code=hi", false);
  request.send();
  request.response;</code></p>