title: how Postman send requests? ajax, same origin policy
body: <p>I have found this very useful Chrome extension called Postman. This is a very useful extension especially when you are into programming RESTful applications.</p>
  
  <p>One thing I am confused on is that how this plugin/extension able to send POST request successfully on different domains?</p>
  
  <p>I tried voting in a poll using Postman like this.</p>
  
  <p><img src="https://i.stack.imgur.com/YEyj0.png" alt="Voting using Postman"></p>
  
  <p>After submitting that, the vote was actually counted in, but when I tried doing that using AJAX and JavaScript, it fails, because of different origin policy of browsers.</p>
  
  <p>How is that even possible?</p>
  
  <p>Here is my code using jQuery. I used that in my computer though, localhost.</p>
  
  <pre><code>init: function() {
      $.ajax({
          url: 'http://example.com/vote.php',
          type:'POST',
          dataType: 'html',
          data: {
              id: '1'
          },
          success: function(data) {
          if ( data == 'voted' ) {
              $('.set-result').html( 'you already voted. try again after 24 hours' );
          } else {
              $('.set-result').html( 'successfully voted' );
          }
      }
      });
  },
  </code></pre>