Setproxy method (NotesHTTPRequest - LotusScript)

Set proxy to use for the upcoming request.

Defined in

NotesHTTPrequest

Syntax

Call NotesHTTPRequest.Setproxy(PROXY_URL$, PROXY_PORT)

Parameters

PROXY_URL$: String. The host name or dotted numerical IP address of proxy server.

PROXY_PORT: Long. Set the port to connect to proxy sever, the port number can not greater than 65535, provide wrong port value will cause the exception with error message: Illegal Proxy Port Value, accept value from 0 (using default port) to 65535.

Example

Dim webRequest as NotesHTTPRequest
Set webRequest = NotesSession.CreateHTTPRequest()
Call webRequest.Setproxy(PROXY_URL$, PROXY_PORT)
'Following two requests will go through proxy server
Call webRequest.get(URL$)
Call webRequest.post(URL$, valueV)
Note: If Setproxy fail for some reasons (wrong proxy address or port number) your Call webRequest.get(URL$) will raise an exception with error message: failure in receiving network data.