Share this page

# Request Callback

RequestCB

Example: Asynchronous Conversations | Asynchronous Functions - C

Called before a request is sent.

`WEB_ASYNC_CB_RC_ENUM <function name>(void);`

## Return Values

This function returns a value of WEB_ASYNC_CB_RC_ENUM. For details, see Asynchronous function return values.

## General Information

A request callback is a user-created function. It is invoked once during the creation of each Task A web task consists of an HTTP request and any directly related HTTP responses and requests until the eventual HTTP response to the initial HTTP request. Redirections are not included in an RDR. within the Conversation An Asynchronous Conversation is a series of related web tasks, including tasks caused by redirection. An Asynchronous Conversation starts with the request for the desired response, includes all the requests and responses that are caused by this request (authentication, redirection, and so on) and ends when the desired response is received or when the series of interactions is canceled.. The function is called before any network processing, for example, resolve DNS, connect, and so on.

Examples of the use of a task Initialization callback:

- Modifying a request's URL
- Modifying a request's request body.

An example of where these modifications may be required is repetitive Asynchronous Conversation Patterns where each request should have a different index or timestamp. See Asynchronous Conversation Pattern A Pattern consists of one or more web tasks, issued and responded-to according to a predefined pattern, such as push, poll, or long poll. A Repetitive Pattern consists of more than one Conversation. For example, polling.

This callback can invoke these web utility functions:

C Language

- web_util_set_request_url
- web_util_set_request_body

Java Language

- web.utilSetRequestUrl
- web.utilSetRequestBody

It can also call any of the general utility functions. See Utility Functions: C Language (lr_) or Utility Functions: JavaScript Language (lr.).

See Also

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