C
chrisrichardson
Guest
A while back I posted this thread https://community.progress.com/community_groups/openedge_development/f/19/t/23788 At the time we decided to workaround the proxy issue with our own 4GL socket implementation and some external .net tools. I've just installed 11.7.1, and am playing around with the http client again. Is it possible to pass in username & password to the proxy server? The request below is definitely hitting the proxy server as I'm getting a 302 (Auth Required back). Tried both options below - is there another way to build the proxy client? And is authenticated proxy server supported? Any top tips with this? USING OpenEdge.Net.URI. USING OpenEdge.Net.HTTP.IHttpRequest. USING OpenEdge.Net.HTTP.IHttpResponse. USING OpenEdge.Net.HTTP.IHttpClient. USING OpenEdge.Net.HTTP.RequestBuilder. USING OpenEdge.Net.HTTP.ClientBuilder. DEFINE VARIABLE oRequest AS IhttpRequest NO-UNDO. DEFINE VARIABLE oResponse AS IhttpResponse NO-UNDO. DEFINE VARIABLE httpUrl AS CHARACTER NO-UNDO. def var oClient as IHttpClient no-undo. httpUrl = " http://www.theregister.co.uk" . oRequest = RequestBuilder:Get(httpUrl):Request. oClient = new OpenEdge.Net.HTTP.ProxyHttpClient( ClientBuilder:Build():Client, URI
arse(' username
assword@proxyip
roxyport')) . oResponse = oClient:Execute(oRequest). /* *** OR */ oRequest = RequestBuilder:Get(httpUrl):ViaProxy(' username
assword@proxyip
roxyport'):Request . oResponse = ClientBuilder:Build():Client:Execute(oRequest). MESSAGE oResponse:StatusCode oResponse:StatusReason view-as alert-box info. Thanks
Continue reading...
Continue reading...