A Beginner’s Guide to HTTP and REST

Hypertext Transfer Protocol (HTTP) is the life of the web. It’s used every time you transfer a document, or make an AJAX request. But HTTP is surprisingly a relative unknown among some web developers. This introduction will demonstrate how the set of design principles, known as REST, underpin HTTP, and allow you to embrace its fullest power by building interfaces, which can be used from nearly any device or operating system.

 

REST
REST is a simple way to organize interactions between independent systems. It’s been growing in popularity since 2005, and inspires the design of services, such as the Twitter API. This is due to the fact that REST allows you to interact with minimal overhead with clients as diverse as mobile phones and other websites. In theory, REST is not tied to the web, but it’s almost always implemented as such, and was inspired by HTTP. As a result, REST can be used wherever HTTP can.

HTTP
HTTP is the protocol that allows for sending documents back and forth on the web. A protocol is a set of rules that determines which messages can be exchanged, and which messages are appropriate replies to others. Another common protocol is POP3, which you might use to fetch email on your hard disk. In HTTP, there are two different roles: server and client. In general, the client always initiates the conversation; the server replies. HTTP is text based; that is, messages are essentially bits of text, although the message body can also contain other media. Text usage makes it easy to monitor an HTTP exchange.

Place your comment about A Beginner’s Guide to HTTP and REST




You must me logged in to write a comment
Comments

Be the first to place a comment