【发布时间】:2012-06-07 12:38:34
【问题描述】:
我正在尝试检索这样的文档:
client.setAuthSubToken(token);
String contentUri = "https://docs.google.com/feeds/download/documents/Export?docID="+ entry.getDocId()
+ "&exportFormat=txt&format=txt";
MediaContent mc = new MediaContent();
mc.setUri(contentUri);
MediaSource ms = client.getMedia(mc);
InputStream inStream = ms.getInputStream();
但是我得到了下一个错误:
com.google.appengine.repackaged.org.apache.http.impl.client.DefaultRequestDirector handleResponse
ADVERTENCIA: Authentication error: Unable to respond to any of these challenges: {authsub=WWW-Authenticate: AuthSub realm="https://www.google.com/accounts/AuthSubRequest"}
如果我的客户已通过身份验证,请不要为什么,希望有人可以提供帮助,在此先感谢。
【问题讨论】:
-
你能添加你实际发送请求的行吗?
-
在这一行 MediaSource ms = client.getMedia(mc);正在发送请求。
标签: java oauth google-docs google-docs-api