示例#1
0
 public static Task <IHttpResponse> PostFormAsync(
     this HttpService http, string url, IEnumerable <KeyValuePair <string, string> > form, CancellationToken cancellationToken,
     CacheMode?cache = null, string?cacheKey = null, bool?repeat = null, int?timeoutSeconds = null) =>
 http.PostFormAsync(new Uri(url), form, cancellationToken,
                    cache: cache, cacheKey: cacheKey, repeat: repeat, timeoutSeconds: timeoutSeconds);
示例#2
0
 public static IHttpResponse PostForm(
     this HttpService http, Uri uri, IEnumerable <KeyValuePair <string, string> > form,
     CacheMode?cache = null, string?cacheKey = null, bool?repeat = null, int?timeoutSeconds = null) =>
 Task.Run(() => http.PostFormAsync(uri, form, Kit.CancellationToken,
                                   cache: cache, cacheKey: cacheKey, repeat: repeat, timeoutSeconds: timeoutSeconds)).Result;