#!usr/bin/perl -w use strict; use REST::Client; use MIME::Base64; $ENV{PERL_LWP_SSL_VERIFY_HOSTNAME}=0; ### to ignore the SSL my $username = 'username@system'; my $password = 'password'; my $url = "https://something/api/sessions"; my $client = REST::Client->new(); my $headers = { "Accept" => "application/*+xml;version=1.5", "Authorization" => 'Basic ' . encode_base64($username . ':' . $password), }; $client->POST($url,$headers); print $client->responseContent();