0

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

Melad Basilius
  • 2,691
  • 5
  • 29
  • 55

2 Answers2

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?

Araneo
  • 427
  • 2
  • 8
  • 24
0

i used GET, and sent the parameter brandId as path variable

Melad Basilius
  • 2,691
  • 5
  • 29
  • 55