Exemplo n.º 1
0
 public static void HttpPost(AsyncCallback asyncCallback, AsyncFailCallback asyncFailCallback, string RequestUrl, string Body, CookieContainer CookieContainer = null)
 {
     _SameTimeOperLock.LockOnMaxThread();
     ThreadPool.QueueUserWorkItem((obj) => {
         try
         {
             asyncCallback(HttpWebRequestHelper.HttpPost(RequestUrl, Body, CookieContainer));
         }
         catch (Exception ex)
         {
             asyncFailCallback(ex);
         }
         _SameTimeOperLock.UnLock();
     });
 }
Exemplo n.º 2
0
 public static void HttpPost(AsyncCallback asyncCallback, AsyncFailCallback asyncFailCallback, string RequestUrl, Dictionary <string, string> Query, Dictionary <string, dynamic> Param, CookieContainer CookieContainer = null) =>
 HttpPost(asyncCallback, asyncFailCallback, RequestUrl + "?" + QueryParamsMapToStr(Query, RequestUrl.LoadRequestEncoding()), Param, CookieContainer);