- Ashutosh Varshney
- PowerBuilder
- Thursday, 10 March 2022 09:57 PM UTC
Hello Folks,
I am trying to call a REST webservice from my PowerBuilder 2021 application. I have been provided with a URL and a userid/password to authenticate. I am following our friend Bruce's REST tutorial. I created an external DW with one column and assigned it to dw_1. Here is my code:
String ls_URL, ls_mess
Integer li_rtn
RESTClient rest
ls_URL = 'http://my-url.cloud:7780'
rest = Create RESTClient
rest.Retrieve (dw_1, ls_URL)
li_rtn = rest.GetResponseStatusCode ()
ls_mess = rest.GetResponseStatusText ()
Messagebox ('REST', 'Code: ' + String (li_rtn) + '~r~n' + ls_mess)
I get 401 - Not Authorized. How do I pass the userid/password to the webservice ?
Thank You
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.