Esempio n. 1
0
 public TasClient(TasConfig tasConfig)
 {
     Serializer             = new JsonSerializer();
     this.tasConfig         = tasConfig;
     httpClient.BaseAddress = tasConfig.Uri;
     httpClient.DefaultRequestHeaders.Add("tazzy-secret", tasConfig.Secret);
     httpClient.DefaultRequestHeaders.Accept.Clear();
     httpClient.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json"));
     httpClient.Timeout = TimeSpan.FromSeconds(10);
 }
Esempio n. 2
0
 public TasMiddleware(RequestDelegate next, TasConfig options)
 {
     _next = next;
     _hmac = options.Secret;
 }