|Example: Asynchronous Conversations||Asynchronous Functions - C|
Called before a request is sent.
WEB_ASYNC_CB_RC_ENUM <function name>(void);
Returns a value of WEB_ASYNC_CB_RC_ENUM
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: