Sample code for 30+ languages & platforms
Perl

Example: Http.GetRequestHeader method

Demonstrates the GetRequestHeader method.

Chilkat Perl Downloads

Chilkat2 Perl
use strict;
use warnings;
use Chilkat2;

my $success = 0;

my $http = Chilkat2::Http->new;

my $hdr1 = 'X-CSRF-Token';
my $hdr2 = 'X-Example';

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

print $hdr1, ': ', $http->GetRequestHeader($hdr1), "\n";
print $hdr2, ': ', $http->GetRequestHeader($hdr2), "\n";

# Output:

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