Put URL (Data Format)

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
dickey
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 115
Joined: Wed Apr 08, 2009 11:54 pm

Put URL (Data Format)

Post by dickey » Sun Jul 27, 2014 1:48 am

Hello all,

Returning to LiveCode development after a long break.

Using 6.6.2:

Using a local web server to test retrieving data from a remote MSSQL server.

Hitting the link directly in Chrome returns the data as plain text. All good.


The following code used to return readable text in the field fldCustomer data but now returns text in an unreadable format.

Code: Select all

put URL "http://192.168.0.5:8080/special/sync_customers" into tSyncCustomerData
put tSyncCustomerData into field "fldCustomers"
In 6.6.2 do I need to declare preferences for unicode or decode the data stream in some way that I have forgotten or neglected to read up on between versions.

Thanks in advance.

Kind regards, Andrew

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Put URL (Data Format)

Post by Simon » Sun Jul 27, 2014 2:19 am

Hi Andrew,
At this point MSSQL has nothing to do with it correct?
I'd say that a browser will automatically load up index.html and default.html but liveCode wont. You'll need the name of the file in your "put" statement.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

dickey
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 115
Joined: Wed Apr 08, 2009 11:54 pm

Re: Put URL (Data Format)

Post by dickey » Sun Jul 27, 2014 4:40 am

Thanks Simon,

Solved it, the web service was outputting headers which LC was not handling.

Changed the headers and the data is flowing again.

Kind regards, Andrew

Post Reply