ChilkatHttpResponse ActiveX Reference (Visual Basic)

ChilkatHttpResponse

Represents a complete HTTP response.

Properties

Body As Variant (read-only)

The response body returned as a byte array.

BodyStr As String (read-only)

The response body returned as a string.

Charset As String (read-only)

The response charset, such as "iso-8859-1", if applicable. Obviously, responses for GIF and JPG files will not have a charset.

ContentLength As Long (read-only)

The content length of the response, in bytes.

Date As Date (read-only)

The Date response header field, returned in an easy-to-use date/time data type.

Domain As String (read-only)

The domain of the HTTP server that created this response.

Header As String (read-only)

The full text of the response header.

NumCookies As Long (read-only)

The number of cookies included in the response.

NumHeaderFields As Long (read-only)

The number of response header fields.

StatusCode As Long (read-only)

The status code (as an integer) from the first line of an HTTP response. If the StatusLine = "HTTP/1.0 200 OK", the response status code returned is 200.

StatusLine As String (read-only)

The first line of an HTTP response, such as "HTTP/1.0 200 OK".

Methods

GetCookieDomain(index As Long) As String

Returns the domain of the Nth cookie in the response. Indexing begins at 0. The number of response cookies is specified in the NumCookies property.

Returns a null on failure

GetCookieExpires(index As Long) As Date

Returns the expiration date/time of the Nth cookie in the response. Indexing begins at 0. The number of response cookies is specified in the NumCookies property.

GetCookieExpiresStr(index As Long) As String

Returns the expiration date/time of the Nth cookie in the response. Indexing begins at 0. The number of response cookies is specified in the NumCookies property.

Returns a null on failure

GetCookieName(index As Long) As String

Returns the name of the Nth cookie returned in the response. Indexing begins at 0. The number of response cookies is specified in the NumCookies property.

Returns a null on failure

GetCookiePath(index As Long) As String

Returns the path of the Nth cookie returned in the response. Indexing begins at 0. The number of response cookies is specified in the NumCookies property.

Returns a null on failure

GetCookieValue(index As Long) As String

Returns the value of the Nth cookie returned in the response. Indexing begins at 0. The number of response cookies is specified in the NumCookies property.

Returns a null on failure

GetHeaderField(name As String) As String

Returns the value of a response header field accessed by field name.

Returns a null on failure

GetHeaderFieldAttr(name As String, attrName As String) As String

Returns a response header field attribute. As an example, the response charset is simply the GetHeaderFieldAttr("content-type","charset")

Returns a null on failure

GetHeaderName(index As Long) As String

Gets the name of the Nth response header field. Indexing begins at 0. The number of response headers is specified by the NumHeaderFields property.

Returns a null on failure

GetHeaderValue(index As Long) As String

Gets the value of the Nth response header field. Indexing begins at 0. The number of response headers is specified by the NumHeaderFields property.

Returns a null on failure

Serialize() As String

Serializes the HttpResponse object to a string.

Returns a null on failure

Unserialize(str As String)

Restores the state of an HttpResponse object from a serialized HttpResponse.