RESTful API path params vs query params

Path params are used to identify a specific resource or resources,.

GET /books
GET /books/:id
POST /books
PUT /books/:id
DELETE /books/:id

Query parameters are used to sort or filter the resources.

GET /books?categories=novels

Leave a Reply

Your email address will not be published.

ANOTE.DEV