Google app engine 如何在Google云端点API中访问用户代理?
我有一个api端点定义如下Google app engine 如何在Google云端点API中访问用户代理?,google-app-engine,google-cloud-endpoints,Google App Engine,Google Cloud Endpoints,我有一个api端点定义如下 @Api (name = "auth", version = "1") public class AuthenticationEndpoint { @ApiMethod public AuthResult Register (@Named ("email") String email, @Named ("password") String pass) { // TODO: do something with the user age
@Api (name = "auth", version = "1")
public class AuthenticationEndpoint {
@ApiMethod
public AuthResult Register (@Named ("email") String email, @Named ("password") String pass) {
// TODO: do something with the user agent here
}
}
在我的注册方法中,有没有办法访问这里的用户代理
谢谢您可以将HttpServletRequest类型的参数添加到方法中 另见此