Nội dung text C3 L5 Love with HTTP Book.pdf
LOVE With HTTP Author : Gautam Kumawat Learn How Hyper Text Transfer Protocol works 1 www.GautamKumawat.com
Table of Contents • Introduction.........................................................................4 • History and About...............................................................6 • Web Architecture and Flow ..............................................7 • How HTTP Works ? .............................................................9 • HTTP Response Message..................................................12 • Response code ..................................................................13 • HTTP Methods ..................................................................14 3 www.GautamKumawat.com
Introduction to HTTP Well, you daily surf Internet using your favorite Web Browser (Client) to access Web-Sites, Mails, and Social Sites etc.. But how all these stuffs works and communicate with each others ? Every Web-Site has an unique name called Domain Name also referred as (Uniform Resource Locator) URL, And every URL starts with four letter (string) (http://) HTTP (Hyper Text Transfer Protocol). Protocol World Wide Web Domain Directory Path Name Well Protocol means a set of rule and functions. Sometimes you might see (https://) (S) stands for secure : It means the communication is secure, Sometimes ports are also included in URL (http://localhost:8080/) 4 www.GautamKumawat.com
Introduction to HTTP The HTTP (Hyper Text Transfer Protocol) is an application protocol used to request web server for web pages, applications, scripts, medias and Dynamic pages. HTTP is responsible for responding client’s request and to delivers web pages to client’s browser. HTTP is simple text based protocol. HTTP is only the protocol for communication between client and server. Suppose you want to access Google site on your browser. You type URL in your browser and hit enter, at that moment your browser generates HTTP request including Domain Name, Path, Method, Directory and Requested File and send it to server, The Request goes through the Internet to the server and server responds you back with HTML, JavaScript, Images and CSS files that your browser can understand and finally it display’s on your screen. The Most Important : HTTP is stateless protocol. It doesn’t manage State. 5 www.GautamKumawat.com
History and About • HTTP is Text based User-Interface Protocol • HTTP works on Request / Response Mechanism • Sir. Tim Berners Lee invented HTTP 0.9 in 1989 • Latest version of HTTP is 1.1 (Upcoming HTTP 2.0) • HTTP was never created for online Banking, Cloud Computing etc. • HTTP Request Methods (GET, POST, HEAD, PUT, Trace etc..) • HTTP delivers Hypermedia contents to client’s browser • Default port for HTTP is Port 80 and 443 for HTTPS. • HTTPS is either Protected by SSL or TLS for secure communication • HTTP is responsible for responding client’s request and deliver Web Pages 6 www.GautamKumawat.com