Allows you to create a custom HTTP request with any method supported by HTTP.

C Language

int web_custom_request( const char *RequestName, <List of Attributes>, [EXTRARES, <List of Resource Attributes>,] LAST);


int object.custom_request( const char *RequestName, <List of Attributes>,[EXTRARES, <List of Resource Attributes>,] LAST);

An expression evaluating to an object of type WebApi. Usually web for Java. See also Function and Constant Prefixes.
The name of the step.
List of Attributes
Note: Attribute names are case–sensitive (Method is not equivalent to method).
A demarcation parameter indicating that the next parameter will be a list of resource attributes.
List of Resource Attributes
A marker that indicates the end of the field list.

Return Values

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


All attributes from the List of Attributes and the List of Resource Attributes can be parameterized using standard parameterization.

General Information

The web_custom_request function is an action function that allows you to create a custom HTTP request using any method or body. This function is only generated for requests that cannot be interpreted with other web functions.

To insert this function manually, use the Add Step dialog box. To specify an HTTP header to be sent before the custom request, add a web_add_header or web_add_auto_header function.

The Extra Resource Attributes are only inserted when performing HTML-based recording and the "Non HTML-generated elements" advanced recording option is set to Record within the current script step. This is the default setting. For more information, refer to the Virtual User Generator Help Center (select the relevant version).

This function is supported for all web scripts.