Pages

Thursday, August 23, 2012

What is a Request and Response?


The communication from Web browser (Web Client) to the Web server is referred to as a Request. In ASP.NET, there is a Request object that is used to represent the Web browser's communication to the Web server. It wraps the resource request in an object that can be queried in code. This includes providing your code access to things like the cookies associated with your site, the query string parameters passed on the URL, the path to the request, and more.

The communication from the Web server back to the Web browser is commonly referred to as the Response. In ASP.NET this information is wrapped in the Response object. You can use this object to set cookies, define caching, set session expiration, and so on. When the Web server responds to a request, it uses what it finds in the Response object to write the actual, text-based HTTP response.

What is HTTP (Hypertext Transfer Protocol)?

HTTP is a text-based communication protocol which is used to request web pages (client) from the web server and send responses back to the web browser (client). HTTP messages are typically sent between the Web server and Web browser using port 80 or port 443 when using Secure HTTP (HTTPS).

No comments:

Post a Comment