Call WebApp APIs?

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
DevBoyLars
Posts: 216
Joined: Wed Feb 27, 2013 9:04 pm

Call WebApp APIs?

Post by DevBoyLars » Mon Dec 08, 2014 10:00 pm

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?

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10052
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Call WebApp APIs?

Post by FourthWorld » Mon Dec 08, 2014 10:17 pm

Yes, LiveCode supports POST (as well as GET). What happened when you tried it?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

trenatos
Posts: 189
Joined: Wed Jul 03, 2013 6:46 am
Contact:

Re: Call WebApp APIs?

Post by trenatos » Tue Dec 09, 2014 12:11 am

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
Marcus

Post Reply