Hi all,

I am trying to connect to Google Docs from an Android application
using the Google Document List Data API (v 2.0) Protocol Guide.
I am able to obtain an Authentication ID by sending a HTTP POST
request.
However, when I send the HTTP GET request, though the returned status
code is 200(success), the content of the response is an html page, not
an xml feed with list of documents on the server.

This is my code for this:

HttpClient client2 = new DefaultHttpClient();
HttpGet httpGetReq = new HttpGet("https://www.docs.google.com/feeds/
documents/private/full");
httpGetReq.addHeader("Authorization: GoogleLogin auth =",authString);
HttpResponse httpGetResponse = client2.execute(httpGetReq);
StatusLine s2 = httpGetResponse.getStatusLine();
int getcode = s2.getStatusCode();
Log.v("RetrieveDocs STATUS CODE IS:", Integer.toString(getcode));
if (getcode == 200) {
BasicResponseHandler bget = new BasicResponseHandler();
String bodyget;
bodyget = bget.handleResponse(httpGetResponse);
System.out.println(bodyget);

client2.getConnectionManager().shutdown();

Any help would be greatly appreciated.

Thanks a lot.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to