在Google Cloud Endpoints中获取原始HTTP数据(标题,Cookie等)

我想知道是否有可能在Cloud Endpoint中收集原始HTTP数据。 我似乎无法在Google的文档中找到任何内容,但App Engine的Twitter告诉我它是( https://twitter.com/app_engine/status/305747445017624576 )。 如果是这样,我可以请它的语法吗? 我知道GCE的API仍处于早期阶段,任何帮助都将不胜感激。

将HttpServletRequest参数添加到您的端点方法,例如

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