Inheritance: HttpHeaders
コード例 #1
0
 /// <summary>
 ///     Authentication, Refresh and Revoke requests all require an Authentication Header Value of "Basic".  This is a
 ///     special method to handle those requests.
 /// </summary>
 /// <param name="request">
 ///     A Request object with a url and a dictionary of key value pairs (<c>Authenticate</c>,
 ///     <c>Refresh</c>, <c>Revoke</c>)
 /// </param>
 /// <returns>Response object</returns>
 private ApiResponse AuthCall(Request request)
 {
     _client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", GenerateAuthToken());
     var response = _client.PostAsync(request.Url, request.HttpContent).Result;
     var result = new ApiResponse(response);
     AuthDataRefreshed?.Invoke(request, new AuthEventArgs(result));
     return result;
 }
コード例 #2
0
 public ApiException(string message, ApiResponse response)
     : base(message)
 {
     Response = response;
 }
コード例 #3
0
 public AuthEventArgs(ApiResponse response)
 {
     Response = response;
 }