Interview Questions

How to explain The HTTP Protocol?

SOAP Interview Questions and Answers


(Continued from previous question...)

How to explain The HTTP Protocol?

HTTP communicates over TCP/IP. An HTTP client connects to an HTTP server using TCP. After establishing a connection, the client can send an HTTP request message to the server:

POST /item HTTP/1.1
Host: 189.123.345.239
Content-Type: text/plain
Content-Length: 200

The server then processes the request and sends an HTTP response back to the client. The response contains a status code that indicates the status of the request:

200 OK
Content-Type: text/plain
Content-Length: 200


In the example above, the server returned a status code of 200. This is the standard success code for HTTP.
If the server could not decode the request, it could have returned something like this: 400 Bad Request Content-Length: 0

(Continued on next question...)

Other Interview Questions