in reply to Re: https request i got the cURL working
in thread https request i got the cURL working

this is what i get when i type in the curl into the command line:

[dodgers]$ curl https://secondroad.harvestapp.com/account/who_am_i -H +'Accept: application/xml' -H 'Content-Type: application/xml' -u ellio +tt.williams@secondroad.com.au:***** <?xml version="1.0" encoding="UTF-8"?> <hash> <user> <admin type="boolean">true</admin> <timestamp-timers type="boolean">false</timestamp-timers> <email>elliott.williams@secondroad.com.au</email> <id type="integer">111331</id> <timezone>Sydney</timezone> </user> </hash>

and this is what i get when i use the previously mentioned perl code:

[dodgers]$ perl perl_requests.pl % Total % Received % Xferd Average Speed Time Time Time + Current Dload Upload Total Spent Left + Speed 0 38 0 38 0 0 214 0 --:--:-- --:--:-- --:--: +-- 0 Authentication failed for API request.[dodgers]$

the code for the perl program is:

#!/usr/bin/perl my $xml = qx{curl https://secondroad.harvestapp.com/account/who_am_i - +H 'Accept: application/xml' -H 'Content-Type: application/xml' -u ell +iott.williams@secondroad.com.au:*****}; print $xml;

Replies are listed 'Best First'.
Re^3: https request i got the cURL working
by Anonymous Monk on Mar 18, 2010 at 06:24 UTC
    Um, try this
    my @stuff = qw'curl ....'; print "@stuff"; print qx!@stuff!;