Monday 17 June 2019

Which is better having one get endpoints or multiple in my case?

I'm building a simple social network clone and I have to fetch posts from multiple sources.Example of one source endpoint that fetches posts from a community source.'/communities/:communityId/posts?limit=25'​Example of multi-source endpoint:'/posts?source=(community,subscription,all)&id=(id of the source)&limit=25)',​One problem I have with the multi-source endpoint is the 'complexity' I'm going to have in one controller.Which way of doing this fits REST guidelines better?Any thoughts?Edit:Typos in the title.

Submitted June 17, 2019 at 04:10PM by Kr7731

No comments:

Post a Comment