jeudi 20 mai 2021

Passing data from client vs fetching it on server side

I have a REST API which expects few parameters and I am expecting the caller of this API to pass this information in the body. For example:- my API expects userId, first name, last name.

The developer on the client side argues that he wouldn't be sending first name and last name and my API should make another call internally to fetch this information based on user id from some other API. I understand that this could be helpful in some scenarios but I don't think it would be always a good idea that service code makes additional call to fetch additional information which is already available to client. What to know where should I draw the line?

Aucun commentaire:

Enregistrer un commentaire