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
Asked
Active
Viewed 37 times
0
![](../../users/profiles/1973933.webp)
Melad Basilius
- 2,691
- 5
- 29
- 55
2 Answers
1
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?
![](../../users/profiles/3187296.webp)
Araneo
- 427
- 2
- 8
- 24