File tree 3 files changed +8
-7
lines changed
3 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 6
6
</PropertyGroup >
7
7
8
8
<ItemGroup >
9
- <PackageReference Include =" Microsoft.AspNetCore.Components.WebAssembly" Version =" 3.2.0-preview3.20168.3 " />
10
- <PackageReference Include =" Microsoft.AspNetCore.Components.WebAssembly.Build" Version =" 3.2.0-preview3.20168.3 " PrivateAssets =" all" />
11
- <PackageReference Include =" Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version =" 3.2.0-preview3.20168.3 " PrivateAssets =" all" />
12
- <PackageReference Include =" Microsoft.AspNetCore.Blazor.HttpClient " Version =" 3.2.0-preview3.20168.3 " />
9
+ <PackageReference Include =" Microsoft.AspNetCore.Components.WebAssembly" Version =" 3.2.0-preview4.20210.8 " />
10
+ <PackageReference Include =" Microsoft.AspNetCore.Components.WebAssembly.Build" Version =" 3.2.0-preview4.20210.8 " PrivateAssets =" all" />
11
+ <PackageReference Include =" Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version =" 3.2.0-preview4.20210.8 " PrivateAssets =" all" />
12
+ <PackageReference Include =" System.Net.Http.Json " Version =" 3.2.0-preview4.20210.8 " />
13
13
</ItemGroup >
14
14
15
15
<ItemGroup >
Original file line number Diff line number Diff line change 3
3
using Microsoft . Extensions . DependencyInjection ;
4
4
using SampleCore ;
5
5
using System . Threading . Tasks ;
6
+ using System . Net . Http ;
7
+ using System ;
6
8
7
9
namespace ClientSideSample
8
10
{
@@ -15,7 +17,6 @@ public static async Task Main(string[] args)
15
17
//Configure Services
16
18
17
19
//AddBlazorStyled is needed for BlazorStyled to work
18
- builder . Services . AddBaseAddressHttpClient ( ) ;
19
20
builder . Services . AddBlazorStyled ( isDevelopment : false , isDebug : false ) ;
20
21
21
22
//The following is only used by the sample sites and is not required for BlazorStyled to work
@@ -25,7 +26,7 @@ public static async Task Main(string[] args)
25
26
26
27
builder . RootComponents . Add < App > ( "app" ) ;
27
28
28
- builder . Services . AddBaseAddressHttpClient ( ) ;
29
+ builder . Services . AddSingleton ( new HttpClient { BaseAddress = new Uri ( builder . HostEnvironment . BaseAddress ) } ) ;
29
30
30
31
await builder . Build ( ) . RunAsync ( ) ;
31
32
}
Original file line number Diff line number Diff line change 6
6
</PropertyGroup >
7
7
8
8
<ItemGroup >
9
- <PackageReference Include =" Microsoft.AspNetCore.Components.WebAssembly.Server" Version =" 3.2.0-preview3.20168.3 " />
9
+ <PackageReference Include =" Microsoft.AspNetCore.Components.WebAssembly.Server" Version =" 3.2.0-preview4.20210.8 " />
10
10
</ItemGroup >
11
11
12
12
</Project >
You can’t perform that action at this time.
0 commit comments