Hi, here are some notes on how to make a post. These are untested code, by give the general idea.
> >What's the best way to go about making an HTTP POST? >I want to retrieve a dynamic page that is only accessable via a POST. >Is there a module (simple one?) that deals with this? From 'perldoc lwpcook', use HTTP::Request::Common qw(POST); use LWP::UserAgent; $ua = LWP::UserAgent->new; my $req = POST 'http://www.perl.com/cgi-bin/BugGlimpse', [ search => 'www', errors => 0 ]; print $ua->request($req)->as_string; This is maybe the simplest way I know. Even simpler if there is a web page containing a form that POSTs to th +at page is to use WWW::Mechanize. Then it would be as simple as: use WWW::Mechanize; my $ua = WWW::Mechanize->new; $ua->get( 'http://whatever.example.com/' ); $ua->submit_form( fields => { search => 'www', errors => 0 } ); print $ua->content; (The last line is probably more useful than the literal translation of print $ua->res->as_string; )
you can also construct a string to post, rather than supplying them as options, as shown in the $relay below
#!/usr/bin/perl use warnings; use LWP::UserAgent; my $relay; $relay .= "Ecom_transaction_complete=$test&"; $relay .= "IOC_response_code=0&"; my $ua = LWP::UserAgent->new(); my $req = HTTP::Request->new (POST => 'https://zentara.net/cgi-bin/boa +cc.pl'); $req->content_type('application/x-www-form-urlencoded'); $req->content("$relay"); my $res = $ua->request($req); print $res->as_string;

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh

In reply to Re: POST to an aspx destination by zentara
in thread POST to an aspx destination by TendulkarIsGod

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.