Did some research on this, and did find a work-around.
Brief synopsis of work.
I use REDCap for a research effort where I need to pull as well as update data.
REDCap provides an API for PERL, Python, R, and SAS.
They have an API playground, where you can generate the code, and then copy/paste for your own needs. For example, to get information on a project, the API playground generates this for the code:
use strict;
use warnings;
use LWP::Curl;
my $data = {
token => ‘api token’,
content => ‘project’,
format => ‘json’,
returnFormat => ‘json’
};
my $ch = LWP::Curl->new();
my $content = $ch->post(
‘https://redcap.iths.org/api/’,
$data,
‘http://myreferer.com/’
);
print $content;
I found an alternative method:
use strict;
use warnings;
use HTTP::Request::Common qw(POST);
use LWP::UserAgent;
my $ua = LWP::UserAgent->new();
my $req = POST 'https://redcap.iths.org/api/', [
token => 'api token',
content => 'project',
format => 'csv',
returnFormat => 'csv'
]; #--, 'http://myreferer.com/' did not need
my $content = $ua->request($req)->as_string;
print "Content-type: text/html\n\n";
print $content;
Because the REDCap site is secure, authorized users can create a 32 hex digit API token, and that token can be used on any workstation. I also found that you do not need the REFERER.
Feel free to pass this along for others using LWP::Curl ( which as explained is not supported under WIndows ) and who are looking for an alternative.
Rob