Exemplo n.º 1
0
 /// <summary>
 /// Rests the call a synchronize.
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="url">The URL.</param>
 /// <param name="verb">The verb.</param>
 /// <param name="parameters">The parameters.</param>
 /// <param name="token">The token.</param>
 /// <param name="throwException">if set to <c>true</c> [throw exception].</param>
 /// <param name="body">The body.</param>
 /// <returns></returns>
 public static Task <T> RestCallASync <T>(this string url, Method verb, Dictionary <string, string> parameters,
                                          string token = "", bool throwException = true, object body = null) where T : new()
 {
     return(RestClientHelper.DoCallAsync <T>(verb, parameters, url, token, throwException, body));
 }
Exemplo n.º 2
0
 /// <summary>
 /// Rests the call.
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="url">The URL.</param>
 /// <param name="verb">The verb.</param>
 /// <param name="parameters">The parameters.</param>
 /// <param name="user">The user.</param>
 /// <param name="password">The password.</param>
 /// <param name="throwException">if set to <c>true</c> [throw exception].</param>
 /// <param name="body">The body.</param>
 /// <returns></returns>
 public static T RestCall <T>(this string url, Method verb, Dictionary <string, string> parameters,
                              string user, string password, bool throwException = true, object body = null) where T : new()
 {
     return(RestClientHelper.DoCall <T>(verb, parameters, url, user, password, throwException, body));
 }