HTTP
HTTP
▲▼▲▼▲▼
tags : #coding
references : Coding
▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼
▲▼▲▼▲▼
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.
🌎 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
⚡ 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.