BeginForm(HttpSample)
ClearScreen()
Set(@ResrService,"192.168.1.23")
Set(@ResrServicePort,"32001")
Set(@authToken, "")

Http("POST","http://@ResrService:@ResrServicePort/api/v1/token",{"Authorization":"Basic TG9nb1lhemlsaW1PY2VhbjppamJLVlhEb3BpZlBBdFcxL1VmN3VOTHE3RXFlQi94aVhWbmdJODZ4cDhsUWFFUVFsbkNvckpWeHI4OGJKaUorVEI2WXNkay8zaksvalhxV1YxWUp2UT09", "username":"1", "Content-Type":"application/x-www-form-urlencoded"},{"grant_type":"password","username":"LOGO","firmno":"001","password":"123"},@sonuc)
text(1,1,"@sonuc.access_token")
//Input(1,7,"wait... ",{"type":"text","max":"10","min":"1"},@temp)

// Tiger Rest Servis api ucundan referansı verilen malzeme okuma.
Http("GET","http://@ResrService:@ResrServicePort/api/v1/items/1",{"Authorization":"Bearer @sonuc.access_token"}, {},@sonuc)

If(@Response.Status="-1")
ShowMessage({"title":"HATA","message":"@Response.Message ","buttons":"TAMAM"},@secim)
EndIf()

text(1,2,"@sonuc.CARD_TYPE")

Input(1,7,"wait... ",{"type":"text","max":"10","min":"1"},@temp)

// Tiger Rest Servis api ucundan referansı verilen cari okuma.
Http("GET","http://http://@ResrService:@ResrServicePort/api/v1/Arps/1/?ExpandLevel=full",{"Authorization":"Bearer @sonuc.access_token"}, {},@sonuc)

If(@Response.Status="-1")
ShowMessage({"title":"HATA","message":"@Response.Message ","buttons":"TAMAM"},@secim)
EndIf()

text(1,2,"@sonuc.CARD_TYPE")

Input(1,7,"wait... ",{"type":"text","max":"10","min":"1"},@temp)

//Tiger Rest sevis api ucundam sql query çalıştırma.
Http("GET","http://http://@ResrService:@ResrServicePort/api/v1/queries/unsafe?tsql=SELECT CONCAT(FORMAT(NR, 'd3') ,',', NAME) AS NRNAME, FORMAT(NR, 'd3') NR, PERNR FROM L_CAPIFIRM",{"Authorization":"Bearer @sonuc.access_token"}, {},@sonuc)

text(1,2,"firma sayısı: @sonuc.count")
text(1,3,"ilk firma adı: @sonuc.items.1.NR")
Input(1,7,"wait... ",{"type":"text","max":"10","min":"1"},@temp)

Http("PUT","https://jsonplaceholder.typicode.com/posts/1",{"Content-Type": "application/json"},{"id":"1","title":"foo","body":"bar","userId":"1"},@sonyc)

text(1,4,"@sonyc.id")
text(1,5,"@sonyc.title")
text(1,6,"@sonyc.body")
Input(1,7,"wait... ",{"type":"text","max":"10","min":"1"},@temp)
//
EndForm()