What is HTTP Request ?

HTTP was meant to transfer hypertext documents.That is, it was originally intended simply to link documents together without consideration for anything like the Web-based user interfaces that are the staple of modern Web sites.

The earliest versions of HTTP supported a single GET request to fetch the named resource . It then was the server’s job to send the file as a stream of text. After the response arrived at the client’s browser, the connection terminated.

The earliest versions of HTTP supported only transfer of text streams and did not support any other sort of data transfer.

How the HTTP Request look ?

GET /aspnet4sbs/helloworld.htm HTTP/1.1

Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, … , */*

Accept-Language: en-us

Accept-Encoding: gzip, deflate

User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; … .NET CLR 3.0.04506.30)

Host: localhost:80

Connection: Keep-Alive

Example of HTTP Requester :

  1. Start Visual Studio,NET by clicking New, Project on the main menu.
    In the New Project dialog box, click Console Application and name the application WebRequestorApp , as shown in the following graphic:


2.Add the below references into the program.cs file .

3. Add the below code into the program.cs file.

4. Run the application by clicking Debug, Start Without Debugging on the main menu.Visual Studio starts a Console  for you and runs the program.After a couple of moments, you will see some HTML on your screen.

Kalpesh Sharma
StackBuddy from Kalpesh Sharma aims to help out bloggers & developer to become successful online. Stackbuddy is focus on several things like blogging tips, search engine optimization tips, make money online tips , SEO tips, job updates , programing tips and internet marketing tips for your online success.
HTTP Requests from a Browser in asp .net was last modified: July 9th, 2016 by Kalpesh Sharma
Get Free Weekly Updates

Get Free Weekly Updates

Get Weekly Email on latest blogging Tips & news from Stackbuddy.

You have Successfully Subscribed!

Leave a Reply

Your email address will not be published. Required fields are marked *

Get Free Weekly Updates

Get Free Weekly Updates

Get Weekly Email on latest blogging Tips & news from Stackbuddy

You have Successfully Subscribed!

Share This

Share this post with your friends!