Passing list of boxed primitives to Google Cloud Endpoint

前端 未结 2 634
臣服心动
臣服心动 2021-01-15 19:29

I am struggling with Lists as method parameters at Google Cloud Endpoints.

The documentations says that

The supported parameter types are the foll

2条回答
  •  生来不讨喜
    2021-01-15 19:50

    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)

提交回复
热议问题