public RequestState() { BufferRead = new byte[BufferSize]; RequestData = new StringBuilder(string.Empty); Request = null; ResponseStream = null; CallBack = null; }
/// <summary> /// Method to make an asynchronous HTTP request. The asynchronous call is placed in it's own thread. /// </summary> /// <param name="url">URL to call</param> /// <param name="credentials">Credentials if required</param> /// <param name="callBack">Call back on result, if required.</param> public void AsyncRequest(string url, NetworkCredential credentials = null, HTTPCallBack callBack = null, int timeout = 5000) { new Thread(new ParameterizedThreadStart(DoAsyncCall)).Start(new object[] { url, credentials, timeout, callBack }); }