zenpc / gdata-javascript-client

Automatically exported from code.google.com/p/gdata-javascript-client
0 stars 0 forks source link

need to manually set If-Match for service.updateEntry #41

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Attempt to piece together how to update an entry from javascript, in my case 
updating a spreadsheet list feed entry (row)
2. do service.updateEntry(url,entry,cb,eb);
3. Get an error 400 with message 'Missing resource version ID'

What version of the product are you using? On what operating system?
google.load("gdata", "2.x");

workaround is to:

          service.setHeaders({"If-Match": "*"});
          service.updateEntry(url,entry, cb, eb);
          service.setHeaders({"If-Match": null});

would have also expected service.setHeader(<string>,<string>) to be available 
based on other APIs...

Original issue reported on code.google.com by akrh...@gmail.com on 20 Dec 2011 at 9:17

GoogleCodeExporter commented 8 years ago
This hack now appears to be causing a problem as subsequent API requests 
generate back 412 http errors when if-match is null.  Boggling...

Original comment by akrh...@gmail.com on 19 Nov 2013 at 4:58