コード例 #1
0
 public RoatpApiClientBase(string baseUri, ILogger <CB> logger, IRoatpTokenService tokenService)
 {
     _client = new HttpClient {
         BaseAddress = new Uri(baseUri)
     };
     _logger       = logger;
     _tokenService = tokenService;
 }
 public RoatpApiClient(HttpClient httpClient, ILogger <RoatpApiClient> logger, IRoatpTokenService tokenService) : base(httpClient, logger)
 {
     _httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", tokenService.GetToken(httpClient.BaseAddress));
 }
コード例 #3
0
 public RoatpApiClient(ILogger <RoatpApiClient> logger, IRoatpTokenService tokenService, IWebConfiguration configuration) : base(configuration.RoatpApiClientBaseUrl, logger, tokenService)
 {
 }