Day 1: HTTP Fundamentals & REST APIs
Theoretical Questions
- What is HTTP and how does it work? Explain the request-response cycle.
- What are the different HTTP methods (GET, POST, PUT, PATCH, DELETE) and when should each be used?
- Explain HTTP status codes. What's the difference between 2xx, 3xx, 4xx, and 5xx?
- What are HTTP headers? Name some important request and response headers.
- What is the difference between stateless and stateful protocols? Is HTTP stateless?
- Explain idempotency in REST APIs. Which HTTP methods are idempotent?
- What is REST? What are the principles of RESTful API design?
- How would you version a REST API? What are the different approaches?
Machine Coding Question
Build a Simple REST API Server (30 mins)
Create a basic Express server with CRUD endpoints for a "Task" resource (id, title, description, status). Implement proper HTTP methods, status codes, and basic validation. No database required - use in-memory array.
Day 2: HTTPS, Security & Authentication Basics
Theoretical Questions
- What is HTTPS? How does it differ from HTTP?
- Explain SSL/TLS. What is the SSL handshake process?
- What is encryption? Explain symmetric vs asymmetric encryption.
- What are certificates? What is a Certificate Authority (CA)?
- What is the difference between authentication and authorization?