I need to expose a rest api which needs 4 parameters, as of now. I have two options:
1) GET request with 4 query params
2) POST request with an Object passed that encapsulates 4 parameters.
If i use case 1)
, then what if in future, more parameters need to be sent thereby making URL lengthy as query parameters will be increased. If i use case 2)
, then rest guideline will be violated as POST only meant to create/update.
Please let me know what is best approach in this case.