Back to Home
What Is HTTP & HTTPS ?

What Is HTTP & HTTPS ?

B
Blizine Admin
·2 min read·0 views

Mohamed Elmorsy Posted on May 31 What Is HTTP & HTTPS ? # http # go # learning # programming What is ? (2 Part Series) 1 What is? — A Backend Developer Learning in Public 2 What Is HTTP & HTTPS ? Every time you open a browser and visit a website, something invisible but essential happens in the background — your browser and the server are having a conversation. The rules that govern that conversation are called HTTP . And when that conversation needs to be private, we add a layer of security on top, giving us HTTPS . This is the foundation every web developer should understand before writing a single line of backend code. What Is HTTP? HTTP stands for HyperText Transfer Protocol . It is an application-layer protocol that defines how messages are formatted and transmitted between a client (like your browser) and a server (the machine hosting a website or API). Think of HTTP as a language — both the client and server speak it so they can understand each other. Without HTTP, a browser would have no standard way to ask for a webpage, and a server would have no standard way to respond. Key characteristics: Stateless — each request is independent; the server has no memory of previous requests Text-based — requests and responses are human-readable plain text Request/Response model — the client always initiates; the server always responds Want a visual walkthrough? Traversy Media's HTTP Crash Course & Exploration is one of the best video explanations out there. Highly recommended before moving on. How HTTP Works: The Request/Response Cycle Every HTTP interaction follows a strict two-step pattern. Step 1 — The Request The client (your browser or app) sends a request to the server. A raw HTTP request looks like this: GET /users/123 HTTP / 1.1 Host : api.example.com Content-Type : application/json Authorization : Bearer <token> Enter fullscreen mode Exit fullscreen mode It has three parts: Part Example Purpose Request Line GET /users/123 HTTP/1.1 Method + pat

📰Dev.to — dev.to

Comments