1. erwin monreal
  2. PowerBuilder
  3. Monday, 3 May 2021 08:46 AM UTC

Hi

We currently have a powerbuilder app that gets and posts data via webapi with JWT authentication

working sample code is below:

lnv.SetRequestHeader("Authorization","Bearer "+ ls_token)
lnv.SendRequest("POST","https://beta.mycomp.com/getvalues",as_jsondata, EncodingUTF8!)

it works great so far.

 

The problem is there is a recent requirement to use a proxy server to be able to make calls.

I was given a proxy server and a port (ex. 10.11.12.13:3128)

 

Does anyone know how to incorporate this into the httpclient? or how to implement this in the app itself.

 

in .NET it seems the proxy is integrated on instantiation of the client but there is no such option in powerbuilder.

 

 

 

Erw

erwin monreal Accepted Answer Pending Moderation
  1. Tuesday, 4 May 2021 00:33 AM UTC
  2. PowerBuilder
  3. # 1

the idea is just the app uses the proxy and not the entire environment. This is possible in .net. Seems like powerbuilder cannot handle this. Appeon has responded saying that the httpclient cannot do this.

Comment
  1. Armeen Mazda @Appeon
  2. Tuesday, 4 May 2021 00:48 AM UTC
You can workaround. Create a .NET DLL that calls the Web service and then use the .NET DLL importer to import it into PowerScript and call it from your app. Also, please suggest this enhancement to the HTTPClient to our product management team by emailing product@appeon.com.
  1. Helpful
There are no comments made yet.
Peter Piechutzki Accepted Answer Pending Moderation
  1. Monday, 3 May 2021 09:18 AM UTC
  2. PowerBuilder
  3. # 2

Hi,

Just a stupid thought that came up to my mind, is the proxy mentioned just being used for your PB App to connect to the WebApi or was it given to you as a general proxy for your pc environment to connect to internet? If latest, you may just want to set the in the machines internet options?

Otherwise maybe look into the SoapConnection class?

regards

Peter

 

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.