stepanbenes/api-for-nopcommerce

Call api with HttpClient

Closed this issue · 2 comments

How authorize (like swagger button) with HttpClient calling ?
Have a sample ?

See ClientApp project.

var tokenResponse = await nopApiClient.RequestToken(new TokenRequest { Username = args[1], Password = args[2], RememberMe = true });

then set access token returned in tokenResponse as Authorization header in each http request