in reply to Re: Creating REST API
in thread Creating REST API

I looked at URI query_form you suggested. Does it mean that it allows me to pass all header parameters I listed in the example?

Replies are listed 'Best First'.
Re^3: Creating REST API
by Your Mother (Archbishop) on Sep 09, 2010 at 21:24 UTC

    Any reasonable agent (LWP::UserAgent or WWW::Mechanize are good choices) is going to handle the headers for you and the only thing special about them seems to be the dev token and maybe but not necesisarily the cookie. Without a spec I can't offer more but you should be able to add the dev token this way-

    my $mech = WWW::Mechanize->new(); ... $mech->add_header(Authorization => "YOUR DEV KEY HERE"); ...

    And you might have to also do a sign-in / authentication before doing your API calls to get an auth'd session cookie, but maybe not. Then you robustly and easily build API calls with URI or a subclass of it.