<?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 Re: Set the Host header my Power Query in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Set-the-Host-header-my-Power-Query/m-p/3805907#M51367</link>
    <description>&lt;LI-CODE lang="markup"&gt;let
    Source = Value.Metadata(Web.Contents("https://www.beringer.net", [Headers=[Referer="www.beringer.net"]]))
in
    Source&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 02 Apr 2024 20:47:51 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2024-04-02T20:47:51Z</dc:date>
    <item>
      <title>Set the Host header my Power Query</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Set-the-Host-header-my-Power-Query/m-p/3793872#M51046</link>
      <description>&lt;P&gt;My API has a requirement to set the Host in the header, but Power BI throw an error when I try:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RobHess05_0-1711537148982.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1067794iA4B8C461C38A7356/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RobHess05_0-1711537148982.png" alt="RobHess05_0-1711537148982.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code looks good, and works if I set other values in the header.&amp;nbsp; It just throws an error if I set the Host.&amp;nbsp; What's the best way to do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Source = Value.Metadata(Web.Contents("https://www.borat.net/wp-json/wp/v2/posts?_fields=date,modified,link,title,author,comment_status,status&amp;amp;per_page=100&amp;amp;orderby=modified&amp;amp;order=desc", [ Headers = [#"Host" = "www.borat.net"] ])),&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2024 11:04:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Set-the-Host-header-my-Power-Query/m-p/3793872#M51046</guid>
      <dc:creator>RobHess05</dc:creator>
      <dc:date>2024-03-27T11:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: Set the Host header my Power Query</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Set-the-Host-header-my-Power-Query/m-p/3795859#M51096</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/300320"&gt;@RobHess05&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Based on my understanding, this issue may now still be related to the API can't be run successfully with this host name. &lt;/SPAN&gt;Please first try to run the API with the host correct value in the third party tool Post Man until successfully get the response&lt;SPAN&gt;, then you can try to run the same API request in the same format (same header and body) in the Power query: &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.postman.com/" aria-label="Link Postman API Platform | Sign Up for Free" target="_blank"&gt;Postman API Platform | Sign Up for Free&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vyangliumsft_0-1711609416787.jpeg" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1068429iC026BAD2378E2EF1/image-size/large?v=v2&amp;amp;px=999" role="button" title="vyangliumsft_0-1711609416787.jpeg" alt="vyangliumsft_0-1711609416787.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Liu Yang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;Accept it as the solution&lt;/EM&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2024 07:03:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Set-the-Host-header-my-Power-Query/m-p/3795859#M51096</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-03-28T07:03:57Z</dc:date>
    </item>
    <item>
      <title>Re: Set the Host header my Power Query</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Set-the-Host-header-my-Power-Query/m-p/3805261#M51357</link>
      <description>&lt;P&gt;Thank you for the reply&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;.&amp;nbsp; Yes, this works well in Postman.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the actual let query that throws the error in Power BI:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;let
    Source = Value.Metadata(Web.Contents("https://www.beringer.net/wp-json/wp/v2/posts?_fields=date,modified,link,title,author,comment_status,status&amp;amp;per_page=100&amp;amp;orderby=modified&amp;amp;order=desc", [ Headers = [#"Host" = "www.beringer.net"] ])),&lt;/LI-CODE&gt;&lt;P&gt;and here's the working Postman request&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RobHess05_0-1712067794746.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1070998i6C53D62F9AF015B2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RobHess05_0-1712067794746.png" alt="RobHess05_0-1712067794746.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's an open API, so you should be able to reproduce the error if you try my query from Power BI.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2024 14:24:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Set-the-Host-header-my-Power-Query/m-p/3805261#M51357</guid>
      <dc:creator>RobHess05</dc:creator>
      <dc:date>2024-04-02T14:24:05Z</dc:date>
    </item>
    <item>
      <title>Re: Set the Host header my Power Query</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Set-the-Host-header-my-Power-Query/m-p/3805907#M51367</link>
      <description>&lt;LI-CODE lang="markup"&gt;let
    Source = Value.Metadata(Web.Contents("https://www.beringer.net", [Headers=[Referer="www.beringer.net"]]))
in
    Source&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 02 Apr 2024 20:47:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Set-the-Host-header-my-Power-Query/m-p/3805907#M51367</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-04-02T20:47:51Z</dc:date>
    </item>
    <item>
      <title>Re: Set the Host header my Power Query</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Set-the-Host-header-my-Power-Query/m-p/3806106#M51370</link>
      <description>&lt;P&gt;Thank you.&amp;nbsp; Power BI does accept Referer, but I need to use 'Host' in the Header.&lt;/P&gt;&lt;P&gt;Here's my Postman example with &lt;STRONG&gt;Host&lt;/STRONG&gt; in the header, which returns a header with very specific attributes&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RobHess05_0-1712099045189.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1071236iBD510AC406805BC6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RobHess05_0-1712099045189.png" alt="RobHess05_0-1712099045189.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's my example with &lt;STRONG&gt;Referer&lt;/STRONG&gt; in the Header&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RobHess05_1-1712099140843.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1071237i1E18B599426AED43/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RobHess05_1-1712099140843.png" alt="RobHess05_1-1712099140843.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to pull that value out of the header to handle paging.&amp;nbsp; Does Power BI allow 'Host' in the header?&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2024 23:07:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Set-the-Host-header-my-Power-Query/m-p/3806106#M51370</guid>
      <dc:creator>RobHess05</dc:creator>
      <dc:date>2024-04-02T23:07:10Z</dc:date>
    </item>
    <item>
      <title>Re: Set the Host header my Power Query</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Set-the-Host-header-my-Power-Query/m-p/3806116#M51371</link>
      <description>&lt;LI-CODE lang="markup"&gt;Does Power BI allow 'Host' in the header?&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;apparently not.&amp;nbsp;&amp;nbsp;If this is important to you please consider voting for an existing idea or raising a new one at &lt;A href="https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41" target="_blank"&gt;https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2024 23:18:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Set-the-Host-header-my-Power-Query/m-p/3806116#M51371</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-04-02T23:18:20Z</dc:date>
    </item>
  </channel>
</rss>

