public HomeController(IOptions <MarvelConfig> config, IRestSharpExample restSharp, IHttpClientExample httpClient, IWebClientExample webClient, IRestEaseExample restEase, IFlurlExample flurl) { _config = config.Value; _webClient = webClient; _restSharp = restSharp; _httpClient = httpClient; _restEase = restEase; _flurl = flurl; }
public WebClientExample(IOptions <MarvelConfig> config) { _config = config.Value; _client = new WebClient(); _client.BaseAddress = _config.BaseUrl; }
public RestSharpExample(IOptions <MarvelConfig> config) { _config = config.Value; _client = new RestClient(_config.BaseUrl); }
public HttpClientExample(IOptions <MarvelConfig> config) { _config = config.Value; _client = new HttpClient(); _client.BaseAddress = new Uri(_config.BaseUrl + _config.EndPoint); }