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