Multiple Entity arguments in Google Cloud Endpoints

后端 未结 2 1369
长发绾君心
长发绾君心 2020-12-16 07:52

How can I pass more than one Entity from a client to a Google Cloud Endpoint?

For example, passing a single Entity is easily done in an Endpoint api source file in t

2条回答
  •  甜味超标
    2020-12-16 08:15

    Use the 'named' annotation...

    @ApiMethod(name = "sendStuff")
    public void sendStuff( @Named("clientId") String clientId, @Named("stuff") String stuff )
    

    And for android, the client code would look like this

    SendStuff sl = service.sendStuff( clientId, stuff );
    

提交回复
热议问题