System.Net.HttpWebRequest

Added in .NET Framework 1.1
This is derived from the System.Net.WebRequest class.



GetResponse

Dim oHttpWebRequest As System.Net.HttpWebRequest 

With oHttpWebRequest
   .Method = "GET"
   .Method = "POST"

   .AutomaticDecompression = System.Net.DecompressionMethods.GZip;

   .TimeOut = 10000
   .TimeOut = (int)System.Timespan.FromMinutes(5).TotalMilliseconds;

   .MaximumAutomaticRedirections = 200

   .UserDefaultCredentials = true;

   .Credentials = System.Net.CredentialCache.DefaultCredentials
   .Credentials = new System.Net.NetworkCredential("userid", "password")
   .Credentials = new System.Net.NetworkCredential("userid", "password","INTRANET")

   .CookieContainer = new System.Net.CookieContainer();

   .ContentType = "text/xml";
   .ContentType = "application/json";

   .ContentLength =

   .Headers.Add(System.Net.HttpRequestHeader.Accept, Accept);

   .Encoding = Encoding.UTF8
End With

GetResponse

System.Net.HttpWebResponse oResponse; 
oResponse = oHttpWebRequest.GetResponse

System.IO.StreamReader oStreamReader;
oStreamReader = new System.IO.StreamReader(oResponse.GetResponseStream, System.Text.Encoding.UTF8, true)

oStreamReader.ReadToEnd();




Methods

Abort 
AddRange 
BeginGetRequestStream 
BeginGetResponse 
EndGetRequestStream 
EndGetResponse 
GetObjectData 
GetRequestStream 
GetResponse 

Properties

Accept 
Address 
AllowAutoRedirect 
AllowReadStreamBuffering 
AllowWriteStreamBuffering 
AutomaticDecompressionIndicates the type of decompression that is used.
ClientCertificates 
Connection 
ConnectionGroupName 
ContentLength 
ContentType 
ContinueDelegate 
ContinueTimeout 
CookieContainer 
Credentials 
Date 
DefaultCachePolicy 
DefaultMaximumErrorResponseLength 
DefaultMaximumResponseHeadersLength 
Expect 
HaveResponse 
Headers 
Host 
KeepAlive 
MaximumAutomaticRedirections 
MaximumResponseHeadersLength 
MediaType 
Method 
Pipelined 
PreAuthenticate 
ProtocolVersion 
Proxy 
ReadWriteTimeout 
Referer 
RequestUri 
SendChunked 
ServerCertificateValidationCallback 
ServicePoint 
SupportsCookieContainer 
Timeout 
TransferEncoding 
UnsafeAuthenticatedConnectionSharing 
UseDefultCredentials 
UserAgent 

© 2022 Better Solutions Limited. All Rights Reserved. © 2022 Better Solutions Limited TopPrevNext