示例#1
0
 public void Begin()
 {
     if (this.IsAborted())
     {
         this.state = AsyncHTTPClient.State.ABORTED;
         return;
     }
     if (this.m_Method == string.Empty)
     {
         this.m_Method = "GET";
     }
     string[] headers = (from kv in this.header
                         select string.Format("{0}: {1}", kv.Key, kv.Value)).ToArray <string>();
     this.m_Handle = AsyncHTTPClient.SubmitClientRequest(this.tag, this.m_ToUrl, headers, this.m_Method, this.m_FromData, new AsyncHTTPClient.RequestDoneCallback(this.Done), new AsyncHTTPClient.RequestProgressCallback(this.Progress));
 }
示例#2
0
 public void Begin()
 {
     if (this.IsAborted())
     {
         this.state = AsyncHTTPClient.State.ABORTED;
     }
     else
     {
         if (this.m_Method == string.Empty)
         {
             this.m_Method = "GET";
         }
         this.m_Handle = AsyncHTTPClient.SubmitClientRequest(this.tag, this.m_ToUrl, this.header.Select <KeyValuePair <string, string>, string>((Func <KeyValuePair <string, string>, string>)(kv => string.Format("{0}: {1}", (object)kv.Key, (object)kv.Value))).ToArray <string>(), this.m_Method, this.m_FromData, new AsyncHTTPClient.RequestDoneCallback(this.Done), new AsyncHTTPClient.RequestProgressCallback(this.Progress));
     }
 }
示例#3
0
 private static IntPtr SubmitClientRequest(string tag, string url, string[] headers, string method, string data, AsyncHTTPClient.RequestDoneCallback doneDelegate)
 {
     AsyncHTTPClient.RequestProgressCallback progressDelegate = null;
     return(AsyncHTTPClient.SubmitClientRequest(tag, url, headers, method, data, doneDelegate, progressDelegate));
 }