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;

In reply to Re^2: https request i got the cURL working by elliottw
in thread https request i got the cURL working by elliottw

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.