Web Vuser Functions (WEB) > Alphabetical List of Web Vuser Functions > Response Callback

Response Callback

ResponseCB

Example: Asynchronous Conversations Asynchonous Functions

Called at the end of a conversation.

WEB_ASYNC_CB_RC_ENUM <function name>( IN const char * aResponseHeadersStr,IN int aResponseHeadersLen,IN const char *aResponseBodyStr, IN int aResponseBodyLen, IN int aHttpStatusCode );

Argument Description
aResponseHeadersStr

A pointer to one of:

  • A non-empty string containing the accumulated response headers of the last conversation task, if it received a response.
  • An empty string if the last conversation task has not received a response.
aResponseHeadersLen

The length of the string pointed to by aResponseHeadersStr.

aResponseBodyStr

A pointer to one of:

  • A string containing the accumulated response body of the last conversation task. The data can contain NULL bytes (\0) and may be empty.
  • An empty string if the last conversation task has not received a response.
aResponseBodyLen The length of the string pointed to by aResponseBodyStr.
aHttpStatusCode The HTTP status return code.

Return Values

This function returns a value of WEB_ASYNC_CB_RC_ENUM.

Parameterization

Standard parameterization is not available for this function.

General Information

A response callback is a user-created C-language function. It is invoked once at the end of a conversation. If the last request within the group received a response, the accumulated response headers and the accumulated response body are passed to the callback. Informational response headers (status codes 1xx) are ignored.

If the last TaskA 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. did not receive any response, empty strings are passed for accumulated headers and accumulated body.

The response data is processed as follows before being passed to the callback:

This callback can invoke the utility function Request Callback and any of the general utility functions. See Utility Functions: C Language (lr_).

Concept Link IconSee Also