Page 1 of 1

API Get Request in LiveCode

Posted: Thu Jun 04, 2020 2:40 am
by wmiriye
I am trying to connect to my Laravel application using API. I tested everything in postman and the results are being returned in JSON as expected. In Live code, how to I make the GET request. The POST request for logging in and getting the access token is fine but I am having issues with the GET request.

Once I get the access token back, the service provider requires the access toke to be provided in the header when the user logs in. I have that setup in LiveCode UI.

I need help on how to set this token in the header and then do the GET request call which should return the values. However, I was not able to find specific examples for using a header token and doing a GET request in LiveCode. Any help will be greatly appreciated.

Re: API Get Request in LiveCode

Posted: Thu Jun 04, 2020 8:29 am
by FourthWorld
Did you see the GET command in the Dictionary?
https://livecode.com/resources/api/#livecode_script/get

Re: API Get Request in LiveCode

Posted: Thu Jun 04, 2020 5:14 pm
by jacque
You can set the headers using the httpHeaders property. The "get url" command does a GET request.