Passing list of boxed primitives to Google Cloud Endpoint

孤人 提交于 2019-12-01 12:07:27

Please add @Nullable annotation to your method, that will turn your collection-type parameter from a path into a query parameter.

https://developers.google.com/appengine/docs/java/endpoints/annotations#nullable

A more direct way is to add a path property to the API_METHOD annotation and not include the List parameter in the path. As stated here: "If path is specified, parameters can be made query parameters by not including them in the path"

In your case it should look like:

@ApiMethod(name = "testMethod", path="testMethod" httpMethod = HttpMethod.POST)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!