dimanche 22 octobre 2017

should I use different actions or single action?

I am building a web API doing simple operations, it receives one or two params, do some calculations according to the request type, save results to the DB and returns the result. I am wondering which option is better? having different actions for each request type (domain/myapi/operation1/, domain/myapi/operation2/, ...) or just have single action and differentiate using additional parameter (Operation Type).




Aucun commentaire:

Enregistrer un commentaire