Response Header Buffer Callback

Example: Asynchronous ConversationsAsynchronous Functions - C

Called once before a sequence of pushed header buffers.

int <function name>(IN int aHttpStatusCode, IN const char * aAccumulatedHeadersStr, IN int aAccumulatedHeadersLen);

aHttpStatusCodeThe HTTP return code.
aAccumulatedHeadersStrThe string of all accumulated response headers. A non-NULL pointer to a non-empty null-terminated string. The string does not contain any NULL characters (\0) except the terminator.
aAccumulatedHeadersLenThe length of the string pointed-to by aAccumulatedHeadersStr.

Return Values

Returns a value of WEB_ASYNC_CB_RC_ENUM

General Information

The response header buffer callback is a function created during recording and can be edited according to the needs of your application. It is invoked once for each response to an asynchronous request. Therefore, for each response, the headers are returned once before the body processing.

This callback is invoked while the response headers are being received. Since the response is arriving when this callback is invoked, you can implement the callback to change the asynchronous behavior for the current response.

The callback is not called at all if no response headers have been received. This includes the case of :

  • HTTP/0.9 — an all-body request with no headers