Page 1 of 1

Put URL (Data Format)

Posted: Sun Jul 27, 2014 1:48 am
by dickey
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

Re: Put URL (Data Format)

Posted: Sun Jul 27, 2014 2:19 am
by Simon
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

Re: Put URL (Data Format)

Posted: Sun Jul 27, 2014 4:40 am
by dickey
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