“Sessions” with Google Cloud Endpoints

后端 未结 3 1473
一生所求
一生所求 2020-12-11 03:06

This question is only to confirm that I\'m clear about this concept.

As far as I understand, Google Cloud Endpoints are kind of Google\'s implementa

3条回答
  •  感情败类
    2020-12-11 03:59

    Yes you can use session, only put another Paramether in your API method with HttpServlet:

    @ApiMethod
    public MyResponse getResponse( HttpServletRequest req, @Named("infoId") String infoId ) {
        // Use 'req' as you would in a servlet, e.g.
        String ipAddress = req.getRemoteAddr();
        ...
    }
    

提交回复
热议问题