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

C Language

int spdy_custom_request( const char *RequestName, <List of Attributes>, [EXTRARES, <List of Resource Attributes>,] LAST);
The name of the step, as it appears in the graphical script.
List of Attributes
Note: Attribute names are case–sensitive. For example, Method is a different name than 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 spdy_custom_request function is an Action Functions that allows you to create a custom HTTP request using any method or body. By default, VuGen generates this function only for requests that could not be interpreted with other spdy 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 User Guide.

This function is supported for all Web scripts.


Using Binary Code

You can use the following format to include binary code in the Body parameter of a spdy_custom_request function:


This represents the hexadecimal value that is represented by [char1][char2].

For example: \x24 is 16*2+4=36, which is a $ sign; \x2B is + sign.

Sequences that do not represent valid 2–character hexadecimal sequences are treated by VuGen as ASCII text. Do not use 1–character hexadecimal sequences. For example, "\x2" is not a valid 2–character hexadecimal sequence. Use "\x02", instead.

Note that binary values appear in a script as \\x, i.e., the "x" is preceded by two backslashes. This is due to C language escaping laws. However, when generating a spdy_custom_request function by using VuGen, you need to type only one backslash.

If you use parameterization within a spdy_custom_request function, include only one backslash within the definition of the parameter. This is because parameter substitution does not perform any C escaping conversion.

The HTTP header can be modified to pass additional information about the request to the server. Using HTTP headers you can, for example, allow other content types in the response such as compressed files, or you can request a Web page only on certain conditions. To modify the HTTP header in the request, see web_add_header. To modify all subsequent requests, see web_add_auto_header.