Creos
Creos

Reputation: 2525

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.

Upvotes: 5

Views: 903

Answers (1)

nilsmagnus
nilsmagnus

Reputation: 2322

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.

Upvotes: 5

Related Questions