dimanche 26 juillet 2015

Pattern for multiple requests to REST server

So let's say I have a typical REST server that queries some data in a very specific manner, like: GET accounts, GET prices, GET inventory, GET settings, GET user_history, etc...

A single view, let's say, needs to fetch N different specific resources like this. What's the best technique/library/pattern for combining N HTTP requests into one without too much hassle?

Maintaining the "REST" idea would require writing new server code for every view because no two views would need the same set of resources. Doing this would become unnecessarily cumbersome in my opinion.

What's the best alternative to writing new response code for every possible combination of a given view's resource requirements?

Aucun commentaire:

Enregistrer un commentaire