Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. http request and web request

http request and web request

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    noo dyab
    wrote on last edited by
    #1

    hello what is the difference between httpwebrequest,httpwebresponse and webrequest,webresponse in asp.net and what do they use for

    A 1 Reply Last reply
    0
    • N noo dyab

      hello what is the difference between httpwebrequest,httpwebresponse and webrequest,webresponse in asp.net and what do they use for

      A Offline
      A Offline
      Abhishek Sur
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups