Skip to main content

Using a Proxy Server

Using a Proxy Server

You can send an HTTP request via a proxy server. In order to set this up, specify the following properties of your HTTP request:

  • ProxyServer specifies the host name of the proxy server to use. If this property is not null, the HTTP request is directed to this machine.

  • ProxyPort specifies the port to connect to, on the proxy server.

  • ProxyUsername specifies the username to use when authenticating to the proxy server, if needed.

  • ProxyPassword specifies the associated password.

  • ProxyHTTPS controls whether the HTTP request is for an HTTPS page, rather than a normal HTTP page. This property is ignored if you have not specified a proxy server. This property changes the default port on the target system to 443, the proxy port. Also see Using SSL to Connect.

  • ProxyTunnel specifies whether to establish a tunnel through the proxy to the target HTTP server. If true, the request uses the HTTP CONNECT command to establish a tunnel. The address of the proxy server is taken from the ProxyServer and ProxyPort properties. If ProxyHttps is true, then once the tunnel is established, InterSystems IRIS negotiates the SSL connection. In this case, the Https property is ignored because the tunnel establishes a direct connection with the target system.

If ProxyUsername is set, and the proxy authorization scheme is Basic or Negotiate, the HTTP request object will set the HTTP Proxy-Authorization header based on the provided credentials. For other scenarios, set the ProxyAuthorization property of the HTTP request as needed.

For details, see the class documentation for %Net.HttpRequestOpens in a new tab.

FeedbackOpens in a new tab