Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what the difference between webrequest and httpwebrequest

Tags:

c#

.net

It seems that HttpWebRequest has more control like ReadWriteTimeout. I am wondering whether I should stick with HttpWebRequest, rather than WebRequest

like image 758
user496949 Avatar asked Dec 16 '10 05:12

user496949


2 Answers

WebRequest is the base/parent class for HttpWebRequest and some other requests as listed here.

For now, they are:

  System.IO.Packaging.PackWebRequest
  System.Net.FileWebRequest
  System.Net.FtpWebRequest
  System.Net.HttpWebRequest
like image 81
Mahesh Velaga Avatar answered Oct 14 '22 09:10

Mahesh Velaga


A WebRequest can be a HttpWebRequest/FtpWebRequest/FileWebRequest (or more in the future...)

like image 26
Cheng Chen Avatar answered Oct 14 '22 07:10

Cheng Chen