[progress Communities] [progress Openedge Abl] Forum Post: Re: Http Client Viaproxy Issue

  • Thread starter Thread starter Peter Judge
  • Start date Start date
Status
Not open for further replies.
P

Peter Judge

Guest
That's a bug in 11.5 that's fixed in 11.6. The ProxyHttpClient is missing a constructor. If you add it things should behave themselves a little better. constructor public ProxyHttpClient( input poClient as IHttpClient): super (poClient). end constructor . If you don't want to muck about with the shipped source, then you have a few options 1) Proxy the request instead of the client. There's a ViaProxy() method on the RequestBuilder too. 2) The ClientBuilder uses a decorator to add proxy capabilities. You can decorate it yourself. def var oClient as IHttpClient no-undo . oClient = new OpenEdge.Net.HTTP.ProxyHttpClient( ClientBuilder:Build():Client, URI:Parse( ' http://myproxy:8080' ) ). oResp = oClient: Execute (oRequest). 3) Create a type that does have that constructor, and have the ClientBuilder use it class MyProxyClient inherits OpenEdge.Net.HTTP.ProxyHttpClient: constructor public MyProxyClient( input poClient as IHttpClient): super (poClient). end constructor . end class . /* and in your session startup (ideally) */ ClientBuilder:Registry: Put ( get-class (ISupportProxy):TypeName, get-class (MyProxyClient)). And make your request calls as below. Note that you will need to add the scheme ('http') to the proxy URI.

Continue reading...
 
Status
Not open for further replies.
Back
Top