找不到批处理请求抛出404 [英] Batch requests throws 404 not found
问题描述
我正在使用Google Apps Java客户端库来开发Android应用程序.我正在尝试发送批量请求,如此处所述.
I'm using the Google Apps Java client library to develop an Android application. I am trying to send a batch request as explained here.
这是我对发现端点的请求代码,您可以看到其中包含一个batchPath
字段,其中"batch"作为值:
This is my request code for the discovery endpoint, which you can see has a batchPath
field with "batch" as value:
BatchRequest batchRequest = mApi.batch();
mApi.insert(mEntity).queue(batchRequest, callback);
batchRequest.execute();
但是我一直得到404 error
.我已经部署了重建的项目,并仔细检查了API网址.为什么我的请求没有到达生成的端点?
However I keep getting a 404 error
. I have already deployed my rebuilt project and double checked the API url. Why is my request not reaching my generated endpoint?
推荐答案
不幸的是,Cloud Endpoints不支持REST批处理(Java客户端库正在尝试使用该批处理).人们可以使用JSON-RPC进行批处理,但是大多数客户端库都是基于REST的,而不是基于RPC的.
Unfortunately, Cloud Endpoints doesn't support REST batching (which the Java client library is trying to use). One can use JSON-RPC for batching, but most client libraries are REST-based, rather than RPC-based.
这篇关于找不到批处理请求抛出404的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!