O7: using cURL
Daniel Sananes
daniel.s at kopparbergs.se
Tue Jan 5 09:01:35 UTC 2021
Hi
We have new projects that involves making API-calls.
I have familiarized myself with cURL to perform these calls.
But how would I use cURL inside Omnis7?
With the command Start program I can start the command prompt but how do I read the answer from the cURL-program?
I can open the command prompt and issue this command:
C:\Users\daniel.s>curl -H "Authorization: Basic Wkw5V0ExV1gxMzRBMzE4UktHOUowWFJXS0xaQVJTWUQ6TVNOSkpTRDVQTTlTRkMxQ1ZMREMyNllHVFVMVDRSWkU=" -X POST https://login.smartpooling.se/uaa/oauth/token -d grant_type=password -d username=Username -d password=Password
Which gives me this in return:
{"access_token":"51b6c672-3fd6-4bac-be9d-8ba19bfc03a6","token_type":"bearer","refresh_token":"fa6cd5f7-166b-479e-84a5-c38b0cd7c2ce","expires_in":31371,"scope":"read write"}
How would I issue the command from inside Omnis7 and how would I receive the returned text into Omis7?
Is this even possible?
Regards
Daniel Sananes
More information about the omnisdev-en
mailing list