Example #1
0
 /// <summary>
 ///     Method tries to deserialize response as TSuccess and then as ApiErrorView
 /// </summary>
 /// <typeparam name="TSuccess">Success response type</typeparam>
 /// <param name="partialUri">Uri part after server address/fqdn and port</param>
 /// <param name="parameters">Request parameters after `?`</param>
 /// <param name="headers">Request headers</param>
 /// <param name="authentificationProvider">Authentification provider</param>
 /// <param name="cancellationToken">Task cancellation token</param>
 /// <returns></returns>
 public static Task <VariadicRequestResult <TSuccess, ApiErrorView> > GetWithApiErrorAsync <TSuccess>(
     string partialUri,
     IDictionary <string, string> parameters = null,
     IDictionary <string, string> headers    = null,
     Delegates.AuthentificationDataAdder authentificationProvider = null,
     CancellationToken cancellationToken = default(CancellationToken))
     where TSuccess : class
 => RegularClient.GetWithApiErrorAsync <TSuccess>(
     partialUri,
     parameters,
     headers,
     authentificationProvider,
     cancellationToken
     );