Hi,
It depends on the language you're using, as there are often libraries to help you. Here's a quick example using Perl:
#!/usr/bin/perl
use REST::Client;
use strict;
use MIME::Base64;
my $auth_string = "user:word";
my $client = REST::Client->new();
$client->setHost("http://fihkisrv01/rest");
$client->addHeader( "Authorization", "Basic ".encode_base64($auth_string));
#$client->GET('/hubs');
print $client->responseContent();
-jon