Part 1: Core Concepts (2 Marks)
- HTTP (Hypertext Transfer Protocol): An application-layer, stateless, request-response protocol running over TCP port 80 (HTTPS over TLS/SSL port 443).
- URL Anatomy:
https://paperkhoj.com:443/bim/semester-3?sort=recent#notes- Scheme:
https, Host:paperkhoj.com, Port:443, Path:/bim/semester-3, Query:?sort=recent, Fragment:#notes.
- Scheme:
- Statelessness: HTTP servers do not retain client session state across multiple requests by default; state persistence is achieved via Cookies, Sessions, and Web Storage (localStorage/sessionStorage).
Part 2: Structural Frameworks (10 Marks)
3-Tier Web Application Architecture
Presentation Tier: Client Web Browser (HTML5, CSS3, JS)
- ^
- HTTP Request / JSON Response
- v
- Application Tier: Web & App Server (Node.js, PHP, Python)
- Business Logic, Authentication, API Controllers
- ^
- SQL Queries / Result Sets
- v
- Data Tier: Database Management System (MySQL, PostgreSQL)
Part 3: Distinction Tables
| Basis of Comparison | HTTP GET Method | HTTP POST Method |
|---|---|---|
| Data Transmission | Form data appended to URL as query string parameters. | Form data sent in the HTTP request payload body. |
| Visibility & Security | Visible in browser address bar and web logs (insecure). | Hidden from URL; suitable for passwords and sensitive inputs. |
| Idempotence & Caching | Idempotent; heavily cached by browsers and proxies. | Non-idempotent; not cached by default. |
| Data Size Limit | Limited by browser URL length restrictions (~2048 chars). | Arbitrary large payload size (enables file uploads). |
Part 4: Worked Problems & Exam Traps
HTTP Request and Response Header Breakdown
- POST /api/login HTTP/1.1
- Host: paperkhoj.com
- Content-Type: application/json
- Content-Length: 45
- {“username”: “bim_student”, “pin”: “2026”}
- HTTP/1.1 200 OK
- Content-Type: application/json; charset=UTF-8
- Set-Cookie: session_id=xyz987; HttpOnly; Secure
- {“status”: “authenticated”, “role”: “student”}
Never pass credentials or sensitive parameters via GET requests because query strings are stored in plaintext inside browser history, bookmarks, and server access logs!