Reputation: 4306
i need to expose Rest API which retrieve information about Brand
based on brandId
,
so i need to send brandId
parameter.
from Rest Architecture and Design perspective, should i use Post
(with the parameter in the body), or use Get
and send the parameter as query string or header
Upvotes: 0
Views: 50
Reputation: 4306
i used GET, and sent the parameter brandId
as path variable
Upvotes: 0
Reputation: 497
You should use GET. POST is used to put or update some new information into service/database.
Try to read this: What is the difference between POST and GET?
And this: When should I use GET or POST method? What's the difference between them?
Upvotes: 1