Hi, i am new to java and currently learning to write this code in
java.
I already get an Auth string look like "Auth=DQAAAGgA...dk3fA5N"
returned by the ClientLogin request by using post method. I save the
string as authority.
Then, i attach it as header to look like "Authorization: GoogleLogin
auth=yourAuthToken"
where yourAuthToken is the Auth string returned by the ClientLogin
request.
But when i run the coding i got an error:
ERROR: Server returned HTTP response code: 401 for URL:
http://www.google.com/m8/feeds/contacts/default/full
below is my coding:
URL feedUrl = new URL("http://www.google.com/m8/feeds/contacts/default/
full");
HttpURLConnection con = (HttpURLConnection) feedUrl.openConnection();
con.setRequestMethod( "GET" );
con.setDoInput( true );
con.setRequestProperty( "Authorization","GoogleLogin auth=" +
authority );
Can someone pls tell me what mistake in my coding. Thx in advance...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Contacts API" 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/google-contacts-api?hl=en
-~----------~----~----~----~------~----~------~--~---