Page 1 of 1

Call WebApp APIs?

Posted: Mon Dec 08, 2014 10:00 pm
by DevBoyLars
Hi there,
I want to build an App in LiveCode which connects to a webservice/-app via their webservice-API.

The webservice owner says:
Every API-Request go trough a POST Request with XML or JSON formatted body to a service-url.
And there's also an example to login:

Code: Select all

 curl -v -X POST \ 
–u {E-Mail-Adress}:{API-Key} \ 
-H 'Content-Type: application/xml' \ 
-d '{xml body}' \ 
https://serviceiurl.com/api.php 
Is this possible in LiveCode?

Re: Call WebApp APIs?

Posted: Mon Dec 08, 2014 10:17 pm
by FourthWorld
Yes, LiveCode supports POST (as well as GET). What happened when you tried it?

Re: Call WebApp APIs?

Posted: Tue Dec 09, 2014 12:11 am
by trenatos
Using webservices (APIs) is very doable in LiveCode, but you'll need a library(free) if you want to work with JSON formatted data.

I'm quite sure I've used this library in the past: https://github.com/luxlogica/easyjson

Best of luck! LC is great