HTTP Protocol
HTTP Protocol
The Hypertext Transfer Protocol (HTTP) is an application-level protocol with the lightness and speed necessary for distributed, collaborative, hypermedia information systems. It is a generic, stateless, objectoriented protocol which can be used for many tasks, such as name servers and distributed object management systems, through extension of its request methods (commands). A feature of HTTP is the typing of data representation, allowing systems to be built independently of the data being transferred. The HTTP is based on a request/response paradigm. A client establishes a connection with a server and sends a request to the server in the form of a request method, URL, and protocol version, followed by a MIME-like message containing request modifiers, client information, and possible body content. The server responds with a status line, including the message's protocol version and a success or error code, followed by a MIME-like message containing server information, entity maintain information, and possible body content. WebNMS supports the development of HTTP agents which confirms to HTTP 1.0 and HTTP 1.1 version.
HTTP Basics
HTTP stands for Hypertext Transfer Protocol. It's the network protocol used to deliver virtually all files and other data (collectively called resources) on the World Wide Web, whether they're HTML files, image files, query results, or anything else. Usually, HTTP takes place through TCP/IP sockets. A browser is an HTTP client because it sends requests to an HTTP server (Web server), which then sends responses back to the client. The standard (and default) port for HTTP servers to listen on is 80, though they can use any port. HTTP is used to transmit resources, not just files. A resource is some chunk of information that can be identified by a URL (Uniform Resource Locator). The most common kind of resource is a file, but a resource may also be a dynamically-generated query result, the output of a CGI script, a document that is available in several languages, or something else.
Header3: value3 <optional message body goes here, like file contents or query data; it can be many lines long, or even binary data $&*%@!^$@> Initial lines and headers should end in CRLF, though you should gracefully handle lines ending in just LF. (More exactly, CR and LF here mean ASCII values 13 and 10, even though some platforms may use different characters.)
HTTP Methods
A request line has three parts, separated by spaces: a method name, the local path of the requested resource, and the version of HTTP being used. There are three HTTP Methods, namely GET, HEAD, and POST.
The HTTP response is normally program output, not a static file. The most common use of POST, by far, is to submit HTML form data to CGI scripts. In this case, the Content-Type: header is usually application/x-www-form-url encoded, and the Content-Length: header gives the length of the URLencoded form data. You can use a POST request to send whatever data you want, not just form submissions. Just make sure the sender and the receiving program agree on the format