If ajax internetworking is not allowed, then how should you use the google spreadsheet API

If ajax internetwork calls are not allowed, then how should you do this ? Note: outdated link. The question has been updated with the appropriate section on the original page.

From the link; (Developer's Guide: Protocol v 2.0 - Google Spreadsheets API):

Add row

To add a row to the table, start by creating a <entry> element containing the relevant data:

 <entry> <gsx:hours>1</gsx:hours> <gsx:ipm>1</gsx:ipm> <gsx:items>60</gsx:items> <gsx:name>Elizabeth Bennet</gsx:name> </entry> 

Then determine the appropriate URL to send the entry known as the POST URL. The POST URL can be found in the <link> list item, which has rel="http://schemas.google.com/g/2005#post" .

Then perform the necessary authentication and create an authorization header for the new POST request, as described in the authentication sections of this document.

In the body of the POST request, place the Atom <entry> element created above using the content type application/atom+xml .

Now send a request to the POST URL:

 POST http://spreadsheets.google.com/feeds/list/key/worksheetId/private/full 

The tables insert a new row immediately after the last row, which appears in the feed based on the list, which should be indicated immediately before the first completely empty row.

+4
source share
1 answer

Cross-domain ajax restrictions are just a browser limitation. If you make a webservice call from a server or other application, you will not be limited. If you need to make an ajax call, you can proxy the call through your server.

+3
source

Source: https://habr.com/ru/post/1391990/


All Articles