为什么Google Cloud Endpoints会颠倒我的参数顺序?

时间:2015-05-10 23:24:57

标签: android google-cloud-endpoints

我有以下端点方法:

public class PlayerEndpoint {
  private static final String PLAYER_NAME = "player_name";
  private static final String PLAYER_UUID = "player_uuid";

  @ApiMethod(name = "register", httpMethod = ApiMethod.HttpMethod.POST, path="register")
  public Player register(@Named(PLAYER_UUID) String uuid,
                         @Named(PLAYER_NAME) String playerName) {
  log.info(String.format("Registering user uuid: %s name: %s", uuid, playerName));
  ...
  }
}

当我从Android客户端拨打电话时:

String uuid = "test_uuid";
String name = "test_name";
playerEndpoint.register(uuid, name).execute();

后端记录:

Registering user uuid: test_name name: test_uuid

这里发生了什么?

0 个答案:

没有答案