API with Json

Hi,
If I want to post data into API using Json, is there any possibility to do it with xojo.

for the moment i am using curl via linux shell.

It would be great if I can manage this in xojo desktop.

curl -X POST https://schyzosoft.id:8099/tpc/api/save -H "usr: DEMO" -H "token: oBh0CeUbtVKFuZSQJz3QcZ2yKGvl4GNlQie3O9Xh332DfU7AfTVO1g==" -H "Content-Type: application/json"  --data-binary @- <<DATA
{
	"no": "auto",
	"dt": "11/03/2022 00:00",
	"locCode": "ASBH",
	"custCode": "RTL",
	"ptypeCode": "EDC",
	"ptermCode":"CASH",
	"cashier": "100",
	"remark": "uji API",
	"sourceTransId": "",
    "incTax":"true",
	"items": [{
DATA

thanks
arief

may be this can help…

1 Like

could be done with
https://documentation.xojo.com/api/networking/urlconnection.html
https://documentation.xojo.com/api/text/json/jsonitem.html
https://documentation.xojo.com/api/text/json/generatejson.html

1 Like