Hi, Can anyone help me please?
I'm trying to build a function to make a REST request and get a callback response using autoit.
Thank you very much.
Justin
This my REST Request url:
http://localhost/Sale
this is the json request value pairs {"Amount":$0.99, "Orderid": "001"}
my REST callback url:
http://localhost/Callback/SaleResponse
this the callback response values {"Success": [true|false], "Result": [SUCCESS|FAIL|CANCEL]}
Func My_Sale($Total, $Oid)
RequestDefault('{refer: "http://localhost", agent: "autoit/Request", callback: "MyCallback"}')
Local $Data = Request("http://localhost/Sale", '{Amount: $Total, Orderid: $Oid}')
;ConsoleWrite($Data & @LF)
EndFunc
Func MyCallback($Obj)
Local $Data = Json_ObjGet($Obj, "Data")
Local $EffectiveUrl = Json_ObjGet($Obj, "http://localhost/Callback/SaleResponse")
;Need to get callback result checked.
EndFunc