0% found this document useful (0 votes)
6 views3 pages

HTTP

HTTP (HyperText Transfer Protocol) is essential for web communication, enabling data exchange between clients and servers. It was invented by Tim Berners-Lee in 1989 to standardize internet data sharing and support web services. HTTP has evolved through various versions, with HTTPS providing enhanced security, and is utilized by frameworks like Flutter for API interactions.

Uploaded by

ismailovich1904
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)
6 views3 pages

HTTP

HTTP (HyperText Transfer Protocol) is essential for web communication, enabling data exchange between clients and servers. It was invented by Tim Berners-Lee in 1989 to standardize internet data sharing and support web services. HTTP has evolved through various versions, with HTTPS providing enhanced security, and is utilized by frameworks like Flutter for API interactions.

Uploaded by

ismailovich1904
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
You are on page 1/ 3

▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼

▲▼▲▼▲▼
tags : #coding
references : Coding
▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼
▲▼▲▼▲▼

🌍 Everything About HTTP (HyperText Transfer


Protocol)
HTTP (HyperText Transfer Protocol) is the foundation of communication on the web. It
enables data exchange between clients (browsers, apps) and servers. Without HTTP, we
wouldn’t have websites, APIs, or cloud-based apps.

🚀 Why Was HTTP Invented?


Before HTTP, computers could only communicate via manual data transfers or closed network
protocols. HTTP was invented to:
✅ Standardize how data is shared over the internet.
✅ Allow different devices and systems to communicate easily.
✅ Enable web pages, images, and files to be accessed globally.
✅ Support RESTful APIs, making web services more interactive.
Invented by: Tim Berners-Lee in 1989 (the father of the World Wide Web).

🌐 How HTTP Works (Step by Step)


1️⃣ Client (Browser/App) Sends an HTTP Request
The user types a URL ( https://example.com ) or an app makes an API request.
The request is sent to a server (website, API, database).
It includes HTTP methods (GET, POST, etc.), headers, and body data.

2️⃣ Server Processes the Request


The server receives the request and fetches the required data.
If it's a database request, it retrieves or modifies data.
The server then formats a response (JSON, HTML, XML, etc.).

3️⃣ Server Sends an HTTP Response


The response contains status codes (200 OK, 404 Not Found, etc.).
It also includes content (like JSON data or a webpage).
The client (browser/app) processes the response and displays results.

4️⃣ Client Displays or Processes Data


In a browser, HTML pages are rendered.
In a Flutter app, the UI updates with API data.

🔗 HTTP and Its Relationship to Flutter


Flutter apps use HTTP to communicate with web APIs.
Since Flutter is a mobile framework, it needs HTTP to:

Fetch data from a remote server (e.g., user data, news, stock prices).
Send data (like user inputs, form submissions).
Authenticate users using tokens.
Sync app data with a backend.

Flutter’s HTTP Packages


1️⃣ http (Basic) – Lightweight and easy to use.
2️⃣ dio (Advanced) – Supports interceptors, timeout handling, and better error management.

🌎 HTTP vs HTTPS
Feature HTTP HTTPS
Security ❌ Not Secure ✅ Encrypted (SSL/TLS)
Data Transfer Plain Text Encrypted
Used For Public websites, basic APIs Banking, Authentication, Secure APIs
🛠️Domains in HTTP
A domain is the address of a website or API.
Example:

Website: https://www.google.com/
API: https://api.spense.com/expenses

Domains consist of:

Protocol: http:// or https://


Subdomain: api.example.com (optional)
Domain name: example.com
Path: /users (specific resource)

⚡ Types of HTTP
1️⃣ HTTP/1.1 – Standard web communication, allows persistent connections.
2️⃣ HTTP/2 – Faster, more efficient with multiplexing (multiple requests at once).
3️⃣ HTTP/3 – Uses QUIC protocol for even faster, more secure communication.

🎯 Summary
HTTP is how the internet communicates (used for web browsing & APIs).
Flutter uses HTTP to fetch/send data with http or dio .
HTTPS is more secure than HTTP.
Domains define where requests are sent ( api.example.com ).
HTTP has evolved (HTTP/1.1 → HTTP/2 → HTTP/3) for better speed and security.

You might also like