Skip to main content
Adds a callback to be invoked on intermediate HTTP calls in order to debug or trace the traffic.

Syntax

Parameters

handler   _In_
Type: HCCallRoutedHandler
The handler to be called. context   _In_opt_
Type: void*
Client context to pass to callback function.

Return value

Type: int32_t A unique ID that can be used to remove the handler.

Remarks

Call HCInitialize before you call this function. libHttpClient invokes the handler synchronously each time an HTTP call is performed. Keep the handler short and don’t block in it. To remove the handler, pass the returned ID to HCRemoveCallRoutedHandler.

Requirements

Header: httpClient.h Library: libHttpClient.lib Supported platforms: Windows, XBOX One family consoles and XBOX Series consoles

See also

httpClient
HCCallRoutedHandler
HCRemoveCallRoutedHandler
HCInitialize
Last modified on October 30, 2026