in reply to Re: HTTP Post read response , Post again
in thread HTTP Post read response , Post again

If it is indeed a login problem. The issue is that the OP is probably not keeping up with cookies.

Since HTTP is a stateless protocol, the server has no concept of a login. The application may have a session concept which is normally tracked with cookies. This is why I suspect the problem is cookie related. As I recall, LWP::UserAgent has a feature for using HTTP::Cookies to track a cookie jar that handles this issue.

G. Wade
  • Comment on Re^2: HTTP Post read response , Post again

Replies are listed 'Best First'.
Re^3: HTTP Post read response , Post again
by perljunkie (Initiate) on Dec 19, 2008 at 16:34 UTC
    Looks like it. Any sample code to begin with? Will I be able to handle Java Session using IOR?

      It looks like you can either create an HTTP::Cookies object and pass it to the user agent object:

      require HTTP::Cookies; my $cookie_jar = HTTP::Cookies->new( file => 'cookies.txt, ); $ua->cookie_jar( $cookie_jar );

      or default to a temporary in-memory cookie jar with

      $ua->cookie_jar( {} );

      See HTTP::Cookies and LWP::UserAgent for more details.

      G. Wade