Batch requests throws 404 not found

一曲冷凌霜 提交于 2019-12-11 09:28:31

问题


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.

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();

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?


回答1:


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.



来源:https://stackoverflow.com/questions/29833473/batch-requests-throws-404-not-found

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!