google / gdata-java-client

Automatically exported from code.google.com/p/gdata-java-client
Apache License 2.0
135 stars 111 forks source link

Unrecognized content type:application/binary #463

Closed tambascot closed 8 years ago

tambascot commented 8 years ago

Attempting to access Sheets feed, the SpreadsheetFeed.class call is returning the wrong data type.

Offending code...

URL SPREADSHEET_FEED_URL = new URL("https://spreadsheets.google.com/feeds/spreadsheets/private/full");

SpreadsheetFeed feed = service.getFeed(SPREADSHEET_FEED_URL, SpreadsheetFeed.class);

Returns a run time error of...

Exception in thread "main" com.google.gdata.util.ParseException: Unrecognized content type:application/binary
    at com.google.gdata.client.Service.parseResponseData(Service.java:2136)
    at com.google.gdata.client.Service.parseResponseData(Service.java:2098)
    at com.google.gdata.client.Service.getFeed(Service.java:1136)
    at com.google.gdata.client.Service.getFeed(Service.java:998)
    at com.google.gdata.client.GoogleService.getFeed(GoogleService.java:645)
    at com.google.gdata.client.Service.getFeed(Service.java:1017)
    at softgoodSnapshot.softgoodSnapshot.updateRows(softgoodSnapshot.java:81)
    at softgoodSnapshot.softgoodSnapshot.main(softgoodSnapshot.java:181)

This was more or less pulled directly from Google's documentation: https://developers.google.com/google-apps/spreadsheets/#updating_a_list_row