Using Google Spreadsheets - Trouble with URL encoding

Creating desktop or client-server database solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
acidjazz
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 93
Joined: Mon Feb 16, 2009 2:37 am

Using Google Spreadsheets - Trouble with URL encoding

Post by acidjazz » Mon May 11, 2009 1:28 am

I'm trying to figure out how to communicate with Google Spreadsheets via Revolution and the Spreadsheets API. Haven't gotten too far. Here is what I'm reading in the Account Authentication API section.
http://code.google.com/apis/accounts/do ... dApps.html
The first example illustrates a basic login request. This example is shown not URL-encoded for clarity.

POST /accounts/ClientLogin HTTP/1.0
Content-type: application/x-www-form-urlencoded

accountType=HOSTED_OR_GOOGLE&Email=jondoe@gmail.com&Passwd=north23AZ&service=cl&
source=Gulp-CalGulp-1.05
My question is simply, what WOULD it look like if it were URL encoded? What do I type into my script?

Thanks,
Mark P.

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Post by mwieder » Mon May 11, 2009 2:59 am

If you open the messagebox and type

Code: Select all

put urlencode("accountType=HOSTED_OR_GOOGLE&Email=jondoe@gmail.com&Passwd=north23AZ&service=cl&source=Gulp-CalGulp-1.05")
you get

Code: Select all

accountType%3DHOSTED_OR_GOOGLE%26Email%3Djondoe%40gmail.com%26Passwd%3Dnorth23AZ%26service%3Dcl%26source%3DGulp-CalGulp-1.05
That get you what you need?

acidjazz
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 93
Joined: Mon Feb 16, 2009 2:37 am

Post by acidjazz » Mon May 11, 2009 4:17 am

Yes, and I'm too embarrassed to tell you what I *wasn't* understanding earlier . But, now I do. Thanks very much!

Mark

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Post by mwieder » Mon May 11, 2009 4:53 am

No problem <g>

acidjazz
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 93
Joined: Mon Feb 16, 2009 2:37 am

Post by acidjazz » Mon May 11, 2009 5:29 am

Unfortunately it now appears that because I do not have the Enterprise version of Revolution, I cannot access google datasets because they require the https (SSL) protocol. Trying to do so using Revolution Studio gets you an "error socket closed" message
:(
Mark

neo42
Posts: 83
Joined: Tue Mar 01, 2011 10:20 pm

Re:

Post by neo42 » Fri Apr 29, 2011 7:56 pm

acidjazz wrote:Unfortunately it now appears that because I do not have the Enterprise version of Revolution, I cannot access google datasets because they require the https (SSL) protocol. Trying to do so using Revolution Studio gets you an "error socket closed" message
:(
Mark

I have livecode 4.6 commercial license. I think I can probably use HTTPS. How do you sign into an SSL account from livecode?

Post Reply