2017 R2 RESTful question
- Issue
- REST
- Rick Rockett
- PowerBuilder
- Wednesday, 6 June 2018 05:30 PM UTC
Greetings,
I am having difficulty getting my RESTful webservice to authenticate. I know that the webservice is up because when I use the following code, I get a Return code 401 - Unauthorized.
rest.Retrieve(dw_rest_poc, ls_url)
ll_code = rest.GetResponseStatusCode()
ls_code_text = rest.GetResponseStatusText()
I am now trying to authenticate and from everything I read it seems to me I am doing it correctly, what am I missing?
ls_header = ls_login + ":" + ls_password
I then convert that ls_header string to Base64. Then I do the SetRequestHeader
rest.Setrequestheader("Authorization", "Basic " + ls_encoded)
Now when I do the retrieve, I only get a -1 return code.
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.