mirror of
https://github.com/markjprice/cs11dotnet7.git
synced 2026-04-05 06:15:24 +00:00
Initial commit
This commit is contained in:
parent
f7cc057037
commit
f2066234b0
18 changed files with 98 additions and 18 deletions
|
|
@ -3,6 +3,7 @@ using Microsoft.AspNetCore.Identity; // IdentityUser
|
|||
using Microsoft.EntityFrameworkCore; // UseSqlServer, UseSqlite
|
||||
using Northwind.Mvc.Data; // ApplicationDbContext
|
||||
using Packt.Shared; // AddNorthwindContext extension method
|
||||
using System.Net;
|
||||
using System.Net.Http.Headers; // MediaTypeWithQualityHeaderValue
|
||||
|
||||
// Section 2 - configure the host web server including services
|
||||
|
|
@ -40,7 +41,11 @@ builder.Services.AddNorthwindContext();
|
|||
builder.Services.AddHttpClient(name: "Northwind.WebApi",
|
||||
configureClient: options =>
|
||||
{
|
||||
options.DefaultRequestVersion = HttpVersion.Version30;
|
||||
options.DefaultVersionPolicy = HttpVersionPolicy.RequestVersionOrLower;
|
||||
|
||||
options.BaseAddress = new Uri("https://localhost:5002/");
|
||||
|
||||
options.DefaultRequestHeaders.Accept.Add(
|
||||
new MediaTypeWithQualityHeaderValue(
|
||||
mediaType: "application/json", quality: 1.0));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue