title: Get JSON API form docker host
body: <p>I build qBittorrent from Dockertools box. And qBittorrent have a API <strong>get torrentlist</strong> . It's like that :</p>
  
  <pre><code>GET /query/torrents HTTP/1.1
  User-Agent: Fiddler
  Host: 127.0.0.1
  Cookie: SID=your_sid
  </code></pre>
  
  <p>But i run it in this host : <a href="http://192.168.99.100:8080/" rel="nofollow noreferrer">http://192.168.99.100:8080/</a> so i use loadJSON() of javascript to catch what i want . But it's always fail . 
  This in console :</p>
  
  <p><code>XMLHttpRequest cannot load http://192.168.99.100:8080/query/torrents?filter=uploading&amp;appid=f782f1c06749ea791dcb5d22219adf068a0d16a5a2c7b6686b17459562eb6b4f. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.</code></p>
  
  <p>my code here :</p>
  
  <pre><code>var torrent_peer;
  
  function loadJSON(url, callback) {
    var xobj = new XMLHttpRequest();
    if (xobj) {
      xobj.overrideMimeType("application/json");
      xobj.open('GET', url, true); // Replace 'my_data' with the path to your file
      xobj.withCredentials = true;
      xobj.onreadystatechange = function() {
        if (xobj.readyState == 4 &amp;&amp; xobj.status == "200") {
          callback(xobj.responseText);
        }
      };
      xobj.send();
    }
  }
  
  function load() {
    loadJSON("http://192.168.99.100:8080/query/torrents?filter=uploading&amp;appid=f782f1c06749ea791dcb5d22219adf068a0d16a5a2c7b6686b17459562eb6b4f", function(response) {
  
      var actual_JSON = JSON.parse(response);
      console.log(actual_JSON);
    }, 'jsonp');
  }
  </code></pre>
  
  <p>i read some question but it doesn't work. So any one can help me . Thank a lot !</p>