Example 1 (using RESTClient)
If the JSON string returned from the RESTFul Web Service
perfectly meets the requirements specified in the section called “JSON formats (required by RESTClient object)” in PowerScript Reference, you can directly use the
RESTClient object to get the data, as shown below.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
restclient lnv_restclient string ls_url long ll_row lnv_restclient = create restclient ls_url = "https://rest.appeon.test/getemployees" /* JSON string retruned from the url [ {"Id":1106,"First_name":"Vincent","Last_name":"Phillipino","Sex":"Male","Age":63}, {"Id":1107,"First_name":"Natalie","Last_name":"Mariano","Sex":"Female","Age":16}, {"Id":1108,"First_name":"Li","Last_name":"Mary","Sex":"Female","Age":36}, {"Id":1109,"First_name":"Vic","Last_name":"Lu","Sex":"male","Age":20} ]*/ ll_row = lnv_restclient.retrieve(dw_1,ls_url) destroy lnv_restclient messagebox("Restclient","The rowcount of dw_1 = "+string(ll_row)) |
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest