Salesforce

How to use the HttpClient to connect via a proxy server?

« Go Back

Information

 
TitleHow to use the HttpClient to connect via a proxy server?
URL Namehow-to-use-the-httpclient-to-connect-via-a-proxy-server
Article Number000206242
EnvironmentProduct: OpenEdge
Version: 11.5.1, 11.6.x, 11.7.x, 12.x
OS: All Supported Platforms
Question/Problem Description
The code below demonstrates connecting to an Web Service using httpClient via a Proxy Server.
Steps to Reproduce
Clarifying Information
Error MessageSecurity Socket Layer (SSL) failure. Error code 10060: Unknown network error (9318)
Defect Number
Enhancement Number
Cause
Resolution
The ViaProxy option needs to be used when building the Request:
USING OpenEdge.Net.HTTP.*

DEFINE VARIABLE oClient AS IHttpClient     NO-UNDO.
DEFINE VARIABLE oReq    AS IHttpRequest  NO-UNDO.

/* all requests */
oClient = ClientBuilder:Build()
                  :ViaProxy('http://proxy.example.com')
                  :Client.
                  
/* single request */                  
oReq = RequestBuilder:Get('http://www.example.com')
            :ViaProxy('http://proxy.example.com')
            :Request.

 
Workaround
Notes
References to Other Documentation:
Progress Article(s):
Getting started with HTTP client for OpenEdge
 
Keyword Phrase
Last Modified Date1/10/2024 8:29 PM

Powered by