1. Andrea Rimicci
  2. PowerBuilder
  3. Wednesday, 20 March 2019 11:36 AM UTC

Hello, 

how can I use an application-specific proxy (I mean, I will not use the system-defined proxy or that hasn't been set) to use for httpclient requests?

Marco Meoni Accepted Answer Pending Moderation
  1. Wednesday, 20 March 2019 12:06 PM UTC
  2. PowerBuilder
  3. # 1

Hi,

first encode in Base64 your proxy usr/pwd. Then set the Proxy-Authorization field of HTTP header:

Blob lblb_auth

lblb_auth = Blob(ls_usr + ":" + ls_pwd, EncodingANSI!)

ls_auth = lnv_CoderObject.base64encode(lblb_auth)

lnv_HttpClient.SetRequestHeader("Proxy-Authorization", "Basic " + ls_auth)

// do something 

 

Best,

.m

Comment
There are no comments made yet.
Kevin Ridley Accepted Answer Pending Moderation
  1. Wednesday, 20 March 2019 11:41 AM UTC
  2. PowerBuilder
  3. # 2

HttpClient requests don't use a proxy.

Comment
  1. Andrea Rimicci
  2. Wednesday, 20 March 2019 12:16 PM UTC
Do you mean, I'm outta luck?
  1. Helpful
  1. Kevin Ridley
  2. Wednesday, 20 March 2019 12:26 PM UTC
Were you talking about the proxy object that we used to generate from WSDL for Soap Web services? If not, I apologize, I thought that's what you were talking about when you said proxy. You don't use that object with the HTTPClient, but see Marco's response above if you were talking about the proxy authorization in the http header.
  1. Helpful
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.