<cUrl_Http>.HttpHeader

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Modules > CURL > cUrl_Http > <cUrl_Http> Response Properties >

<cUrl_Http>.HttpHeader

 

Description

 

Read only property to retrieve request response headers.

 

Syntax

 

exitCode = <cUrl_Http>.HttpHeader

 

Returns

 

String, containing all the headers of the response, separated by new line.

 

Remarks

 

Value is filled by using the <cUrl_Http>.Exec.

 

If you need the headers already parsed to items, use <cUrl_Http>.HttpHeaders instead of <cUrl_Http>.HttpHeader.

 

Restrictions
 

Read only.

 

See also

 

Examples

 

uses "curl", "console"

 

Dim httpRequest As New cUrl_Http("https://www.thinbasic.com")

 

httpRequest.Exec

 

printl httpRequest.HttpHeader ' Will contain multiline string, with response headers, such as:

                              ' Content-Length: 40416

                              ' Content-Type: text/html

                              ' Content-Location: http://www.thinbasic.com/Index.html

                              ' Last-Modified: Mon, 06 Apr 2020 16:42:26 GMT

                              ' Accept-Ranges: bytes

                              ' ETag: "9c5cdc5a32cd61:9a9e"

                              ' Server: Microsoft-IIS/6.0

                              ' X-Powered-By-Plesk: PleskWin

                              ' X-Powered-By: ASP.NET

                              ' Date: Mon, 23 Nov 2020 20:24:38 GMT