Skip to content

libcURL.ResponseHeaderEngine.Count

Andrew Lambert edited this page Nov 26, 2022 · 9 revisions

Method Signature

 Function Count(Name As String = "", Origin As libcURL.HeaderOriginType = libcURL.HeaderOriginType.Any, RequestIndex As Integer = -1) As Integer

Parameters

Name Type Comment
Name String Optional. The name of the headers to count instances of.
Origin HeaderOriginType Optional. The origin type of the headers to count instances of.
RequestIndex Integer Optional. The request index to count the headers of. By default, only the final request's headers are counted.

Return value

The number of headers that match the parameters.

Remarks

Counts the number of response headers that match all of the parameters. If a parameter is unspecified then all headers match it. Hence, with no parameters specified this method counts the number of response headers to the final request in the transfer

Response headers may originate from several different stages in an HTTP(S) operation depending on circumstances such as proxying, HTTP version, redirection, etc. The Origin parameter restricts the count to headers originating only during a particular stage.

A single transfer might consist of a series of HTTP requests, for example redirects or multi-stage authentication. The RequestIndex parameter lets you specify which request you want. 0 being the first request, 1 being the next, and so on. -1 refers to the most recent request in the series. -2 refers to all headers across all transfers. Refer to the RequestCount() method to determine the number of transfers.

Clone this wiki locally