-1

In rest, we have different ways( like query parameters,path parameters and body) to send data to service from client.

Do we use all these ways for each of Http methods(like GET,PUT,POST,DELETE)? or

Are there any restrictions like GET/PUT,etc should use only some ways to send data?

If Yes, please let me know combinations to use for each Http method.

Java P
  • 2,241
  • 6
  • 31
  • 45

1 Answers1

1

Best check out the standard, as there would be just too many combinations to list here.

But it's customary to use only path and query parameters with GET, and mostly body and path parameters with POST, and all three with PUT. Use the simplest thing that will do the job ;)

P Varga
  • 19,174
  • 12
  • 70
  • 108