<?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: PowerBIClient or HttpClient.SendAsync in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/PowerBIClient-or-HttpClient-SendAsync/m-p/1744629#M28595</link>
    <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;"I am just curious if there is an advantage to use HttpClient.SendAsync (C# .Net Core application) to make PowerBI REST API Call"&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;What kind of advantages do you mean by 'advantage’?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Lionel Chen&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;</description>
    <pubDate>Thu, 25 Mar 2021 06:41:50 GMT</pubDate>
    <dc:creator>v-lionel-msft</dc:creator>
    <dc:date>2021-03-25T06:41:50Z</dc:date>
    <item>
      <title>PowerBIClient or HttpClient.SendAsync</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/PowerBIClient-or-HttpClient-SendAsync/m-p/1740118#M28559</link>
      <description>&lt;P&gt;Hello:&lt;/P&gt;&lt;P&gt;I am just curious if there is an advantage to use HttpClient.SendAsync (C# .Net Core application) to make PowerBI REST API Call , say get report in a group, by utilizing HttpClientFactory to create HttpClient. The reason I am asking is that I could not tell how PowerBIClient is created as demonstrated in most of Sample Projects provided by Microsoft is using&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;return New PowerBIClient(new Uri(...), new TokenCredentials(accessToken, "Bearer")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Will that be reusing HttpClient to avoid known socket exhaustion issues? How is retry being handled with PowerBIClient?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using .Net 5 web application to embed reports for our customers and use service principal if that matters. Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 23 Mar 2021 15:44:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/PowerBIClient-or-HttpClient-SendAsync/m-p/1740118#M28559</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-03-23T15:44:39Z</dc:date>
    </item>
    <item>
      <title>Re: PowerBIClient or HttpClient.SendAsync</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/PowerBIClient-or-HttpClient-SendAsync/m-p/1744629#M28595</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;"I am just curious if there is an advantage to use HttpClient.SendAsync (C# .Net Core application) to make PowerBI REST API Call"&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;What kind of advantages do you mean by 'advantage’?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Lionel Chen&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 06:41:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/PowerBIClient-or-HttpClient-SendAsync/m-p/1744629#M28595</guid>
      <dc:creator>v-lionel-msft</dc:creator>
      <dc:date>2021-03-25T06:41:50Z</dc:date>
    </item>
    <item>
      <title>Re: PowerBIClient or HttpClient.SendAsync</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/PowerBIClient-or-HttpClient-SendAsync/m-p/1745634#M28609</link>
      <description>&lt;P&gt;Hi, Lionel:&lt;/P&gt;&lt;P&gt;It's not really about advantage, it is more about best practice of using httpclient for REST API calls.&amp;nbsp; It does not seem to me that&amp;nbsp;&lt;SPAN&gt;PowerBIClient is using httpclientfactory to create httpclient ,instead&amp;nbsp; it creates an httpclient every time a powerbiclient is created and get disposed everytime. This could cause the known socket exhaustion issue, or no? In addition, I could not find any information if PowerBIClient has any kind of mechnism to do retry kind of thing. Can you help? Thank you&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 12:54:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/PowerBIClient-or-HttpClient-SendAsync/m-p/1745634#M28609</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-03-25T12:54:37Z</dc:date>
    </item>
  </channel>
</rss>

