Subjects

All subjects Django Java Python React Spring Boot JavaScript PHP
Sign Up Free
Question 1 of 10 · RESTful API Development in PHP
Interview question

What is REST and what makes an API RESTful? REST क्या है और किसी API को RESTful क्या बनाता है?

Answer

REST (Representational State Transfer) is an architectural style for designing networked applications using stateless, resource-based communication over HTTP.

REST PrincipleMeaning
StatelessnessEach request contains all info needed; server stores no client session
Resource-basedURLs represent resources (nouns), not actions (e.g. /users not /getUsers)
Uniform interfaceStandard HTTP methods (GET, POST, PUT, DELETE) map to operations
Client-server separationFrontend and backend evolve independently

An API is 'RESTful' when it follows these conventions consistently, using proper HTTP methods and status codes rather than custom action-based endpoints.

REST एक architectural style है जो stateless, resource-based communication HTTP पर design करने के लिए इस्तेमाल होता है।

REST Principleअर्थ
Statelessnessहर request में पूरी जानकारी होती है, server session नहीं रखता
Resource-basedURLs resources represent करते हैं (जैसे /users)
Uniform interfaceGET, POST, PUT, DELETE जैसे standard HTTP methods

Was this answer clear?