first off, this is my first post, i scanned through the faq did some searches, and now am here.
anyway, i'm trying to access this server with http requests and it's something i've never done before.
the curl looks like this:
curl https://secondroad.harvestapp.com/account/who_am_i -H 'Accept: application/xml' -H 'Content-Type: application/xml' -u elliott.williams@secondroad.com.au:******
and i get out this:
<?xml version="1.0" encoding="UTF-8"?>
<hash>
<user>
<timezone>Sydney</timezone>
<admin type="boolean">true</admin>
<timestamp-timers type="boolean">false</timestamp-timers>
<email>elliott.williams@secondroad.com.au</email>
<id type="integer">111331</id>
</user>
</hash>
and that's perfect. i just can't figure out how to do it with a perl script. i'd like to do it without using any modules but LWP seems to be working.
thanks for the help. if i'm a complete idiot and there is a guide online for this, please direct me there, i've been messing around with this:
http://www.perl.com/pub/a/2002/08/20/perlandlwp.html?page=4
for a day with no luck.
cheers
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.