Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do I have to to use CollectionResponse as a return type in GAE Endpoints APIs or I can use java collections of entities?

It appears that I can safely use plain java collections as return types (as long as they contain entities) in my Endpoint APIs. I was wondering if I'm missing something. Is there any benefit to using CollectionResponse instead?

Thank you.

like image 477
Creos Avatar asked Aug 24 '14 00:08

Creos


1 Answers

Yes, you can safely use collections (doc here). The advantage of CollectionResponse is the built in support for paging and other nice-to-have features.

like image 195
nilsmagnus Avatar answered Oct 29 '22 17:10

nilsmagnus