Been working on this all day and have gotten no where with it.

My Java code looks like this:

   final URL url = 
newURL(String.format("https://spreadsheets.google.com/feeds/download/spreadsheets/Export?key=%s&exportFormat=tsv&gid=0";,
 
spreadsheetId));

HttpURLConnection conn = (HttpURLConnection) url.openConnection();

conn.setRequestProperty("Authorization",

 "GoogleLogin auth=" + wiseAuth.getAuthToken());

conn.setRequestProperty("GData-Version", "3.0"); 

conn.setRequestMethod("GET");

conn.setDoInput(true);

conn.setDoOutput(true);

conn.setInstanceFollowRedirects(true);

conn.connect();


However, I always get a FileNotFound error when attempting to do 
conn.getInputStream(). I narrowed it down to being that the response code is 
405 Method Not Allowed. What am I doing wrong here? The exception is 
returning me my URL and I can access the page just fine in my browser.

Reply via email to