
REST API Design
HTTP methods, status codes, RESTful principles, versioning, HATEOAS, pagination
1What is the appropriate HTTP method to retrieve a list of resources?
What is the appropriate HTTP method to retrieve a list of resources?
Відповідь
The GET method is used to retrieve data without modifying server state. It is idempotent and safe, meaning it can be called multiple times without side effects. GET is the standard method for all read operations in a REST API.
2Which HTTP method is idempotent and completely replaces an existing resource?
Which HTTP method is idempotent and completely replaces an existing resource?
Відповідь
PUT is idempotent and completely replaces the resource at the specified URL. Unlike PATCH which partially modifies, PUT requires sending the complete representation of the resource. Idempotence means calling PUT multiple times with the same data produces the same result.
3What is the main difference between PUT and PATCH?
What is the main difference between PUT and PATCH?
Відповідь
PUT completely replaces the resource and requires sending all fields, even those that don't change. PATCH allows modifying only specified fields, making it more efficient for partial updates. For example, to modify only a user's email, PATCH is preferable.
Which HTTP status code should be returned after successfully creating a resource?
Which HTTP status code to use when the request is valid but authentication is required?
+17 питань зі співбесід
Інші теми співбесід Node.js / NestJS
Node.js Fundamentals
Node.js Core APIs
Asynchronous Programming
Express.js Basics
NestJS Fundamentals
Validation & DTO
API Documentation & Contracts
Error Handling
Unit Testing
Task Scheduling
NestJS Modules & DI
Configuration & Environment Management
JWT Authentication
Authorization & RBAC
Database with TypeORM
Prisma ORM
Middleware & Interceptors
File Upload
WebSockets
GraphQL with NestJS
End-to-End Testing
Caching with Redis
Queues with Bull
DevOps, Logging & CI/CD
Docker & Containerization
Microservices
Security Best Practices
Performance & Cloud Deployment
Опануй Node.js / NestJS для наступної співбесіди
Отримай доступ до всіх питань, flashcards, технічних тестів, вправ code review та симуляторів співбесід.
Почни безкоштовно