Example #1
0
 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;
 }
Example #2
0
 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);
 }
Example #4
0
 public HttpClientExample(IOptions <MarvelConfig> config)
 {
     _config             = config.Value;
     _client             = new HttpClient();
     _client.BaseAddress = new Uri(_config.BaseUrl + _config.EndPoint);
 }