I am using the function http_string('POST': url: SendStr: 'application/json');
URL :http://<localhost>/tse_webapi/auth/token
SendStr: SendStr = '{"grant_type":"password","username":"<xxx>"'
+ ',"password":".<xxx>"}';
Thank you in advance

Code: Select all
dcl-s userid varchar(128) inz('admin');
dcl-s password varchar(128) inz('.Admin01');
dcl-s url varchar(1000);
url = 'https://192.168.16.119/tse_webapi/auth/token';
SendStr = 'grant_type=password'
+ '&username=' + http_urlEncode(userid)
+ '&password=' + http_urlEncode(password);
monitor;
response = http_string('POST'
: url
: SendStr
: 'application/x-www-form-urlencoded');
on-error;
msg = http_error();
endmon;