Sample code for 30+ languages & platforms
Perl

Example: Http.GetRequestHeader method

Demonstrates the GetRequestHeader method.

Chilkat Perl Downloads

Perl
use chilkat();

$success = 0;

$http = chilkat::CkHttp->new();

$hdr1 = "X-CSRF-Token";
$hdr2 = "X-Example";

$http->SetRequestHeader($hdr1,"Fetch");
$http->SetRequestHeader($hdr2,"123ABC");

print $hdr1 . ": " . $http->getRequestHeader($hdr1) . "\r\n";
print $hdr2 . ": " . $http->getRequestHeader($hdr2) . "\r\n";

# Output:

# X-CSRF-Token: Fetch
# X-Example: 123ABC