Example of Message in HTTP
Example 1
HTTP requests that the hello.htm page be removed from the server running on tutorialspoint.com .
Client requires:
GET /hello.htm HTTP / 1.1
User-Agent: Mozilla / 4.0 (compatible; MSIE5.01; Windows NT)
Host: www.tutorialspoint.com
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Connection: Keep-Alive
Server responds:
HTTP/1.1 200 OK Date: Mon, 27 Jul 2009 12:28:53 GMT Server: Apache/2.2.14 (Win32) Last-Modified: Wed, 22 Jul 2009 19:15:56 GMT Content-Length: 88 Content-Type: text/html Connection: Closed
Hello, World!
Example 2
HTTP requests to remove t.html pages that do not exist on the server running on tutorialspoint.com.
Client requires:
GET / t.html HTTP/1.1 User-Agent: Mozilla/4.0 (compatible; MSIE5.01; Windows NT) Host: www.tutorialspoint.com Accept-Language: en-us Accept-Encoding: gzip, deflate Connection: Keep-Alive
Server responds:
HTTP/1.1 404 Not Found Date: Sun, 18 Oct 2012 10:36:20 GMT Server: Apache/2.2.14 (Win32) Content-Length: 230 Content-Type: text/html; charset=iso-8859-1 Connection: Closed
404 Not Found
Not Found
The requested URL /t.html was not found on this server.
Example 3
HTTP requests that the hello.htm page be removed from the server running on tutorialspoint.com but the request comes with an incorrect HTTP version:
Client requires:
GET /hello.htm HTTP1 User-Agent: Mozilla/4.0 (compatible; MSIE5.01; Windows NT) Host: www.tutorialspoint.com Accept-Language: en-us Accept-Encoding: gzip, deflate Connection: Keep-Alive
Server responds:
HTTP/1.1 400 Bad Request Date: Sun, 18 Oct 2012 10:36:20 GMT Server: Apache/2.2.14 (Win32) Content-Length: 230 Content-Type: text/html; charset=iso-8859-1 Connection: Closed
400 Bad Request
Bad Request
Your browser sent a request that this server could not understand.
The request line contained invalid characters following the protocol string.
Example 4
HTTP requests to send sample data to process.cgi page on a server running on tutorialspoint.com . The server returns the transferred name after setting them as cookies:
Client requires:
POST /cgi-bin/process.cgi HTTP / 1.1
User-Agent: Mozilla / 4.0 (compatible; MSIE5.01; Windows NT)
Host: www.tutorialspoint.com
Content-Type: text / xml; charset = utf-8
Content-Length: 60
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Connection: Keep-Alive
first = Zara & last = Ali
Server responds:
HTTP/1.1 200 OK Date: Mon, 27 Jul 2009 12:28:53 GMT Server: Apache/2.2.14 (Win32) Content-Length: 88 Set-Cookie: first=Zara,last=Ali;domain=tutorialspoint.com;Expires=Mon, 19- Nov-2010 04:38:14 GMT;Path=/ Content-Type: text/html Connection: Closed
Hello Zara Ali
According to Tutorialspoint
Previous article: Security in HTTP
Next lesson: Installation instructions C
4 ★ | 1 Vote
You should read it
May be interested
- How HTTP workshypertext transfer protocol (http) provides a network protocol standard that web browsers and servers use to communicate. you see http every day because when you visit a website, the protocol is written right in the url.
- 5 ways to improve website speed with HTTP / 2hypertext transfer protocol version 2 (hypertext transfer protocol version 2) or http / 2 is the latest http standard. updates to this protocol will improve the speed, performance and security of web traffic.
- Encrypt status in HTTPthe status-code element is a 3-character integer, in which the first character of the status encoding defines the response type and the last two characters do not have any sorting role. there are 5 values of the first character.
- Full list of HTTP status codes, HTTP Status Codethe http status line is the term given to the http status code (real code) when accompanied by the 'http reason phrase' - the term for the reason (short description).
- MQTT and HTTP: Which protocol is better in the IoT era?the hypertext transfer protocol (http) has always been the most popular communication tool between client and web server. but is it still suitable for the internet of things era?
- What is HTTP Authentication? 5 Stages of HTTP Authenticationhttp authentication is a security mechanism that helps verify the identity of users when they access web resources.
- How to Execute HTTP POST Requests in Androidhttp post is part of a deprecated http classes like org.apache.http and androidhttpclient as of android 5.1.https://developer.android.com/about/versions/android-5.1.html#http migrate your code to the httpurlconnection classes which...
- How to use Fiddler to collect HTTP / HTTPS sessions for debuggingfiddler is a free web debugging proxy that records all http / https traffic between your web application and the internet. collecting session data with fiddler can be useful for troubleshooting situations
- How to fix Analytics Http failure response for 499 OK realtimethis is an error message when the user accesses analytics, the realtime data section is not displayed, let's find out how to fix this analytics http failure response for 499 ok realtime error with free download.
- What's the difference between HTTP and HTTPS?you probably already know https as an enhanced form of http . however, do you already know the difference between http and https ? if not, let's find out with tipsmake.com!