0
我有兴趣在直接调用此端点所在的URL(https://<my app name>.appspot.com/_ah/api/endpoints/v1/test
)并为其提供正文时获取到达端点的HTTP POST请求的原始主体。这里是一个成功被称为端点的方法:App Engine端点中的原始HTTP请求正文
@ApiMethod(name = "test", path = "test", httpMethod = ApiMethod.HttpMethod.POST)
public WrappedBoolean test(final HttpServletRequest request, ServletContext servletContext) throws Exception {
//???
return new WrappedBoolean(true);
}
不幸的是,试图检索从HttpServletRequest
的InputStream
,然后阅读它,给了我一个-1,这意味着所有的数据已经被读取。这很有意义,因为App Engine端点运行时很可能已经在现在处理了请求。
任何人都有关于如何获取发布到此端点的原始POST请求的视图?