1. ANTONIO MACIAS NOGALES
  2. PowerBuilder
  3. Wednesday, 25 October 2023 11:05 AM UTC

Hi all.

 

I need to request for a token from a webservice, but it's using a certificate (file in a folder and password for validation).

I know it's already implemented in PowerBuilder 2022 as I've been able to test, but in production environment I'm using 2019R3.

 

PowerBuilder 2022 implementation (via SetClientCert):

 

httpclient lnv_httpclient


lnv_httpclient = Create httpclient

lnv_httpclient.SetRequestHeader("Content-Type", "application/json;charset=UTF-8")
lnv_httpclient.SetClientCert("C:\\CHECKOUT\\BRD324\\dertfile.p12", "password")

li_ret = lnv_httpclient.SendRequest("POST", "https://client.corp/connect/Token/GetAccessToken", '{"userId":"user","lastOrder":"0","ExternalApp":"powerapp"}')

if li_ret = 1 and lnv_httpclient.GetResponseStatusCode() = 200 then
lnv_httpclient.GetResponseBody(ls_string)
end if

 

 

Isn't there any other way I could use in 2019 R3? (httpclient is included, but not SetClientCert function).

 

Best



There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.