<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to make a simple HTTP request from a visual? in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/How-to-make-a-simple-HTTP-request-from-a-visual/m-p/544414#M16903</link>
    <description>&lt;P&gt;&lt;SPAN&gt;I have been trying to integrate a request into one of my viusals and I'm having trouble getting it to work. I was hoping you might be able to help me out. I have a local server setup which I am requesting data from using a GET. I thought there might be a cross domain issue with the request, so I set up another local server and ran the same request from there and it worked.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The body of the request is this:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;var xmlhttp = new XMLHttpRequest();
  xmlhttp.onreadystatechange = function() {
    if (this.readyState == 4 &amp;amp;&amp;amp; this.status == 200) {
        console.log(JSON.parse(xmlhttp.responseText))

    }
  };

xmlhttp.open("GET", "http://localhost:8090/vis_data?name&amp;amp;value", true);
xmlhttp.send();&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;The visual is running on port 8080, the data lives on port 8090, and to test the domain issues I ran the same request from port 8070, and it worked.&lt;/P&gt;&lt;P&gt;Can anyone help?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Wed, 17 Oct 2018 09:23:16 GMT</pubDate>
    <dc:creator>bfialkoff</dc:creator>
    <dc:date>2018-10-17T09:23:16Z</dc:date>
    <item>
      <title>How to make a simple HTTP request from a visual?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-make-a-simple-HTTP-request-from-a-visual/m-p/544414#M16903</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I have been trying to integrate a request into one of my viusals and I'm having trouble getting it to work. I was hoping you might be able to help me out. I have a local server setup which I am requesting data from using a GET. I thought there might be a cross domain issue with the request, so I set up another local server and ran the same request from there and it worked.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The body of the request is this:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;var xmlhttp = new XMLHttpRequest();
  xmlhttp.onreadystatechange = function() {
    if (this.readyState == 4 &amp;amp;&amp;amp; this.status == 200) {
        console.log(JSON.parse(xmlhttp.responseText))

    }
  };

xmlhttp.open("GET", "http://localhost:8090/vis_data?name&amp;amp;value", true);
xmlhttp.send();&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;The visual is running on port 8080, the data lives on port 8090, and to test the domain issues I ran the same request from port 8070, and it worked.&lt;/P&gt;&lt;P&gt;Can anyone help?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 17 Oct 2018 09:23:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-make-a-simple-HTTP-request-from-a-visual/m-p/544414#M16903</guid>
      <dc:creator>bfialkoff</dc:creator>
      <dc:date>2018-10-17T09:23:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a simple HTTP request from a visual?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-make-a-simple-HTTP-request-from-a-visual/m-p/544613#M16917</link>
      <description>&lt;P&gt;It turns out that the visual is being hosted on powerbi and not on localhost:8080, and from their server I can't query localhost. Upon replacing the url in local host to&amp;nbsp;&lt;A href="https://jsonplaceholder.typicode.com/todos/1" target="_blank"&gt;https://jsonplaceholder.typicode.com/todos/1&lt;/A&gt; I get the desired result.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Oct 2018 12:16:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-make-a-simple-HTTP-request-from-a-visual/m-p/544613#M16917</guid>
      <dc:creator>bfialkoff</dc:creator>
      <dc:date>2018-10-17T12:16:56Z</dc:date>
    </item>
  </channel>
</rss>

