-
-
Notifications
You must be signed in to change notification settings - Fork 11
libcURL.ResponseHeaderEngine
libcURL.ResponseHeaderEngine
Protected Class ResponseHeaderEngine
This class presents an interface to libcURL's response headers API (the "response header engine"). Each instance of EasyHandle
has its own response header engine. Use this class to query the response headers from the most recent transfer.
A given header name may be used more than once. If more than one instance of a name is present then you may refer to them individually by specifying their index when querying the response headers. You can determine how many headers are using a name by passing the name to the Count()
method.
Response headers may originate from several different stages in an HTTP(S) operation depending on circumstances such as proxying, HTTP version, redirection, etc. When querying the response headers you may restrict the query only to headers of a certain origin by specifying a member of the HeaderOriginType enumeration.
A single transfer might consist of a series of HTTP responses, for example redirects or multi-stage authentication. You can specify the response index when querying the response headers. 0
being the first response, 1
being the next, and so on. -1
refers to the most recent response in the series.
Generally, you should not create your own instances of this class. Instead use the ResponseHeaderEngine reference belonging to the EasyHandle whose response headers you want to query.
Dim c As New cURLClient
If c.Get("https://www.example.com/") Then
' get single header
Dim header As libcURL.ResponseHeader = c.ResponseHeaders.GetHeader("Content-Type")
' get multiple headers
Dim headers() As libcURL.ResponseHeader = c.ResponseHeaders.GetHeaders("", libcURL.HeaderOriginType.Header)
End If
Wiki home | Project page | Bugs | Become a sponsor
Text and code examples are Copyright ©2014-24 Andrew Lambert, offered under the CC BY-SA 3.0 License.