title: Failed to load resource: net::ERR_CONNECTION_REFUSED
body: <p>I am using this function to invoke the REST request, however, whenever I use the button to invoke this function, I get a connection refused. May I know how do I bypass this problem?</p>
  
  <pre><code>function getContacts() {
      var settings = {
          "async": true,
          "crossDomain": true,
          "url": "http://localhost:5000/chaincode",
          "method": "POST",
          "headers": {
              "cache-control": "no-cache",
              "postman-token": "827ed81a-b8b4-d6a5-7e2c-e36f955b7423"
          },
          "data": "{\r\n  \"jsonrpc\": \"2.0\",\r\n  \"method\": \"query\",\r\n  \"params\": {\r\n      \"type\": 1,\r\n      \"chaincodeID\":{\r\n          \"name\":\"mycc\"\r\n      },\r\n      \"ctorMsg\": {\r\n         \"function\":\"query\",\r\n         \"args\":[\"a\"]\r\n      }\r\n  },\r\n  \"id\": 1\r\n}"
      }
  
      $.ajax(settings).done(function (response) {
          console.log(response);
      });
  }
  </code></pre>