title: read/write Google Spreadsheet cell feed with Javascript
body: <p>I try to read and write a cell in google spreadsheet with http request by javascript. The "read" operation works, but the "write" operation fail. 
  Please help to point out which part I should modify in my code of "write" operation.</p>
  
  <p>The write example I followed is from here <a href="https://developers.google.com/google-apps/spreadsheets/" rel="nofollow">https://developers.google.com/google-apps/spreadsheets/</a>,
  and it is not working.</p>
  
  <p>My read operation (this is working):</p>
  
  <pre><code>http_request.onreadystatechange = function() {
      process_cellrw(http_request);
  };
  http_request.open('GET',"https://spreadsheets.google.com/feeds/cells/0Aqed....RHdGc/od6/private/full/R1C1", true);
  http_request.setRequestHeader('Authorization','Bearer ' + strAccessToken);
  http_request.send(null);
  </code></pre>
  
  <p>My write operation (this is not working):</p>
  
  <pre><code>var testxml =  ['&amp;lt;entry xmlns="http://www.w3.org/2005/Atom" &lt;br&gt;
      xmlns:gs="http://schemas.google.com/spreadsheets/2006"&amp;gt;',&lt;br&gt;
      '&amp;lt;id&gt;https://spreadsheets.google.com/feeds/cells/0Aqed....RHdGc/od6/private/full/R1C1&amp;lt;/id&amp;gt;',&lt;br&gt;
      '&amp;lt;link rel="edit" type="application/atom+xml"&lt;br&gt; href="https://spreadsheets.google.com/feeds/cells/0Aqed....RHdGc/od6/private/full/R1C2/9zlgi"/&amp;gt;',&lt;br&gt;
      '&amp;lt;gs:cell row="1" col="1" inputValue="xxxx"/&amp;gt;',&lt;br&gt;
      '&amp;lt;/entry&amp;gt;'].join('');&lt;br&gt;
  
  http_request.onreadystatechange = function() {
      process_cellrw();
  };
  
  http_request.open('PUT',"https://spreadsheets.google.com/feeds/cells/0Aqed....RHdGc/od6/private/full/R1C2/9zlgi");
  http_request.setRequestHeader('Authorization','Bearer ' + strAccessToken);
  http_request.setRequestHeader('GData-Version','3.0');
  http_request.setRequestHeader('Content-Type', 'application/atom+xml');
  http_request.setRequestHeader('If-Match','*');
  http_request.setRequestHeader('Content-Length', testxml.length.toString());
  http_request.send(testxml);
  </code></pre>
  
  <p>The write operation always receive <code>http_request.status = 0</code>  at callback function <code>process_cellrw()</code>.</p>
  
  <p>My environment is Windows 7 + Chrome browser. I also tested it on Android + Webkit, still fails.</p>
  
  <p>I also tested to add a row by list feed, also fails by receive <code>http_request.status = 0</code>.</p>