0% found this document useful (0 votes)
7 views10 pages

Understanding HTTP Protocol Basics

The document provides an overview of the HTTP (HyperText Transfer Protocol), detailing its role as the foundation for web communication and its client-server model. It explains the request and response structures, various HTTP methods, and the differences between HTTP and HTTPS. Additionally, it highlights key features, advantages, and applications of HTTP in online services like food delivery apps, social media, and e-commerce websites.

Uploaded by

pmsjacc
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views10 pages

Understanding HTTP Protocol Basics

The document provides an overview of the HTTP (HyperText Transfer Protocol), detailing its role as the foundation for web communication and its client-server model. It explains the request and response structures, various HTTP methods, and the differences between HTTP and HTTPS. Additionally, it highlights key features, advantages, and applications of HTTP in online services like food delivery apps, social media, and e-commerce websites.

Uploaded by

pmsjacc
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

HTTP Protocol

Team Members:
Joshika.P - AP23110011569
Himaja.V - AP23110011021
Zaara.A - AP23110011033
Sri Medha.D - AP23110010257
INTRODUCTION
• HTTP = HyperText Transfer Protocol
– Standard protocol that allows web browsers and servers to communicate
.
• It is the foundation of communication on the World Wide Web.
– Almost everything you see on the internet is delivered using HTTP.

• Used for transferring web pages, images, videos, APIs, etc.


– Any time you open a link, HTTP delivers the content behind it.

• Works on a client-server model:


– Client requests information → server sends back the data.

• Stateless protocol → server does not remember previous interactions


unless cookies/sessions are used.
– Makes it simple and fast, but requires cookies for login/session continuity.
02
HOW IT WORKS
1. User enters a URL (e.g., [Link]
– This action triggers the browser to start communication.

2. DNS resolves domain → finds server’s IP


– Converts the website name into the server address.

3. Client establishes TCP connection (usually port 80 for HTTP,


443 for HTTPS)
– A safe communication channel is established.

4. Browser sends HTTP Request


– Request includes method, headers, and other details.

5. Server sends HTTP Response


– Server processes and sends data like HTML, images, or
JSON.

6. Browser displays the webpage


– Finally shows the page content to the user. 03
REQUEST STRUCTURE
1. Request Line:
– Defines what action the user wants (GET/POST) and where.
– Method (GET, POST, PUT, DELETE)
– URL
– HTTP version
2. Headers:
– Host, User-Agent, Accept-Type,
– Extra information such as browser type, language, cookies. Cookies
– Provide additional information

3. Body:
– Only present in methods like
POST/PUT – Carries data when sending forms, login info, or files.
– Contains data like form inputs,
JSON, files 04
RESPONSE STRUCTURE
Every HTTP response contains:
1. Status Line: Tells whether the request was successful or failed.
– Status code + Message
– Examples:
✔ 200 OK
✔ 404 Not Found
✔ 500 Internal Server Error

2. Response Headers: Provide server details, content type, caching instructions.


– Content-Type, Cache-Control, Set-Cookie, Server

3. Response Body: Contains the actual content the browser displays.


– Actual content: HTML, JSON, images, videos, files
05
METHODS
• GET – Fetch data (no body)
– Used for normal webpage loading.
• POST – Submit data (login, forms)
– Sends user input securely to backend.
• PUT – Update resource
– Used in APIs to replace existing data.
• DELETE – Remove resource
– Used to delete records via backend API.
• HEAD – Only headers, no body
– Helpful for checking file availability without downloading.
• OPTIONS – Checks supported methods
– Used to know what actions a server allows.
HTTP VS HTTPS
HTTP HTTPS
No encryption: Data is visible Uses SSL/TLS encryption:
in plain text during transfer. Protects sensitive
Data can be intercepted: information like
Anyone listening on the passwords, payments.
network can read the Data is secure: Cannot be
information. read even if intercepted.
Uses port 80 Uses port 443
07
KEY FEATURES & ADVANTAGES
• Stateless → simple and scalable
– Each request stands independently, making servers efficient.

• Flexible → supports text, images, JSON, audio, video


– Can deliver almost all types of digital content.

• Caching supported → faster page loading


– Saves previous responses locally for quick loading.

• Persistent connections (HTTP/1.1) → multiple requests in one connection


– Reduces delay and speeds up web browsing.

• Platform-independent → works across all devices and OS


– Same protocol on mobile, laptop, TV, IoT devices.

• Supports REST APIs → backbone of modern web and mobile apps


– All major apps communicate using HTTP requests. 08
APPLICATION
[Link] Food Delivery Apps (Swiggy/Zomato) Using HTTP:
These apps use HTTP communication in real-time:
• When you open the app:
– App sends HTTP GET requests to fetch nearby restaurants.
• When you add items to cart:
– HTTP POST updates the cart details on the server.
• When placing an order:
– Payment status, address, order items are sent over HTTP.
• Live order tracking:
– App continuously sends HTTP requests to fetch rider location.
2. Social Media Platforms (Instagram / Facebook / Twitter):
HTTP fetches posts and sends likes/comments via API requests.
3. E-Commerce Websites (Amazon / Flipkart / Myntra):
HTTP/HTTPS handles product browsing, cart actions, and secure
payments. 09
Thank You

You might also like