Loading ...
Sorry, an error occurred while loading the content.

Re: [soaplite] Adding cookie to SOAP

Expand Messages
  • Paul Kulchenko
    Hi Tim, SOAP::Lite cookbook might be a good source of information for questions like that. Check using cookie item:
    Message 1 of 2 , Nov 22, 2002
    • 0 Attachment
      Hi Tim,

      SOAP::Lite cookbook might be a good source of information for
      questions like that. Check "using cookie" item:
      http://cookbook.soaplite.com/#using%20cookies

      You need to do smth like this:

      use HTTP::Cookies;
      use SOAP::Lite;

      my $cookie = HTTP::Cookies->new(ignore_discard => 1);
      my $soap = SOAP::Lite
      ....
      ->proxy('http://localhost/', cookie_jar => $cookie);

      my $token = $soap->mymethod(...)->result;

      # A HTTP::Cookies object is a hash. The main attribute is the
      # COOKIES 3 level hash: $self->{COOKIES}{$domain}{$path}{$key}.

      # modify $cookie here

      $soap->myanothermethod(...)....;
      # modified cookie will be included in this and all subsequent cals;

      Hope it helps.

      Best wishes, Paul.

      --- reply2nelson <reply2nelson@...> wrote:
      > I have a method that returns me a token that I am supposed
      > to use as a cookie in all my other SOAP requests.
      > Can someone give me a simple example of plopping a
      > cookie into the header, or point me in the direction
      > of an example.
      > Thanks much. Tim
      >
      >
      > To unsubscribe from this group, send an email to:
      > soaplite-unsubscribe@yahoogroups.com
      >
      >
      >
      > Your use of Yahoo! Groups is subject to
      > http://docs.yahoo.com/info/terms/
      >
      >


      __________________________________________________
      Do you Yahoo!?
      Yahoo! Mail Plus � Powerful. Affordable. Sign up now.
      http://mailplus.yahoo.com
    Your message has been successfully submitted and would be delivered to recipients shortly.