RestCountries Integration is a http client to consume data from Rest Countries API.
Target platform: .NET Core 5+
Task<IEnumerable<Country>> GetAllAsync();
Task<Country> GetByNameAsync(string name);
Task<Country> GetByCodeAsync(string code);
Install the package https://www.nuget.org/packages/RestCountries.Integration/ using nuget
Update your middleware
services.AddHttpClient<IRestCountriesService, RestCountriesService>();
Inject where needed
private readonly IRestCountriesService countriesService;
public HomeController(IRestCountriesService countriesService)
{
this.countriesService = countriesService;
}
- None
- 03 May 2022 - v1.0.0 Only parses limited number of fields