<cUrl_Http>.HttpHeaders.Get

<< Click to Display Table of Contents >>

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

<cUrl_Http>.HttpHeaders.Get

 

Description

 

Retrieves given request header.

 

Syntax

 

headerValue = <cUrl_Http>.HttpHeaders.Get(headerIndex)

 

Returns

 

Header value in form of string.

 

Parameters

 

Name

Type

Optional

Meaning

headerIndex

Integer

No

One based index.

 

 

Remarks

 

You need to perform <cUrl_Http>.Exec method first.

 

Restrictions

 

See also

 

Examples

 

uses "curl", "console"

 

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

 

httpRequest.Exec

 

for as long = 1 to httpRequest.HttpHeaders.Count

  print "Header #" + i + httpRequest.HttpHeaders.Get(i)

next