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

2120Re: [soaplite] Adding cookie to SOAP

Expand Messages
  • Paul Kulchenko
    Nov 22 11:49 AM
    • 0 Attachment
      Hi Tim,

      SOAP::Lite cookbook might be a good source of information for
      questions like that. Check "using cookie" item:

      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

      # 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.
    • Show all 2 messages in this topic