Share this page

# web_set_proxy

Specifies that all subsequent HTTP requests be directed to the specified proxy server.

## C Language

    int web_set_proxy( const char *proxy_host:port );

Java Syntax

Argument | Description
--- | ---
object | An expression evaluating to an object of type WebApi. Usually web for Java. See also Function and Constant Prefixes.
proxy_host:port | The host name of the proxy server. Because a proxy server has no default port, always include the port number in the parameter. Use the format: "host:port". For example: proxy03.vision.net.il:8080.

## Return Values

This function returns LR_PASS (0) on success, and LR_FAIL (1) on failure.

## Parameterization

The following argument(s) can be parameterized using standard parameterization: proxy_host:port

## General Information

The web_set_proxy function is a service function that specifies that all subsequent HTTP requests be directed to the specified Proxy Server. To submit HTTP requests directly to the server (that is, without using a proxy server), use the web_set_proxy function to pass an empty string ("") as an argument.

This function is supported for all web scripts.

## C Example

The following example specifies that all subsequent HTTP requests be directed to the proxy server located at proxy03.my_proxy_server.net:

    web_set_proxy("proxy03.my_proxy_server.net:8080");

## Java Example

The following example specifies that all subsequent HTTP requests be directed to the proxy server located at proxy03.my_proxy_server.net:

    web.set_proxy("proxy03.my_proxy_server.net:8080");

## C Example

The following example specifies that all subsequent HTTP requests be directed to the proxy server located at proxy03.my_proxy_server.net:

    web_set_proxy("proxy03.my_proxy_server.net:8080");

## Java Example

The following example specifies that all subsequent HTTP requests be directed to the proxy server located at proxy03.my_proxy_server.net:

    web.set_proxy("proxy03.my_proxy_server.net:8080");

Tips to improve your search results... VuGen Function Reference Version 26.1 Function Reference 26.1 All View Local Help Center View Online Help Center Version: