http request and web request
-
hello what is the difference between httpwebrequest,httpwebresponse and webrequest,webresponse in asp.net and what do they use for
HttpRequest
/HttpResponse
classes are derived from WebRequest and WebResponse classes which can handles only Http request and response. The method WebRequest.Create returns appropriate object based on the url passed. Say you pass http://www.google.com The create factory method will then produce HttpWebRequest object as Http protocol is used. On the other hand if you use Ftp urls it will produce FtpWebRequest object.So we write : HttpWebRequest req = WebRequest.Create("http://www.google.com") as HttpWebRequest; If you are not sure about the url passed, you can easily use WebRequest class. :cool:Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.
My Latest Articles-->** Simplify Code Using NDepend
Basics of Bing Search API using .NET
Microsoft Bing MAP using Javascript