I read a bout HTTPHeader in MVC (fundamentalbook), but i don’t know what is exactly HTTPHeader ?
Could some one please explain these methods?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The HTTP protocol is a request/response protocol. The request and the response consist of 2 parts: headers and body. The headers indicate metadata about the body such as the length, the type, the compression, information about the authorization and many more. There are standard type of headers defined in the protocol but you could also use custom headers.
In ASP.NET MVC you could read request headers from the Request object and response headers from the Response object. For example:
or
Obviously inside the ASP.NET MVC application you can only modify the response headers. The request headers is a readonly collection as it comes from the client.