// *** Handle cookies - automatically re-assign if (this.bHandleCookies) { Request.CookieContainer = new CookieContainer(); if (this.oCookies != null && this.oCookies.Count > 0) { Request.CookieContainer.Add(this.oCookies); } }
// *** Deal with the POST buffer if any if (this.oPostData != null) { Request.Method = "POST"; switch (this.nPostMode) { case 1: Request.ContentType = "application/x-www-form-urlencoded"; // strip off any trailing & which can cause problems with some // http servers // if (this.cPostBuffer.EndsWith("&")) // this.cPostBuffer = this.cPostBuffer.Substring(0,this.cPostBuffer.Length-1); break; case 2: Request.ContentType = "multipart/form-data; boundary=" + this.cMultiPartBoundary; this.oPostData.Write( Encoding.GetEncoding(1252).GetBytes( "--" + this.cMultiPartBoundary + "\r\n" ) ); break; case 4: Request.ContentType = "text/XML";