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

Re: [soaplite] Re: Getting HTTP Headers

Expand Messages
  • Paul Kulchenko
    Hi Simon, ... As always, there is little bit easier way (idea grabbed from examples in cookbook: http://cookbook.soaplite.com/): use SOAP::Lite +trace =
    Message 1 of 6 , Sep 13, 2002
    View Source
    • 0 Attachment
      Hi Simon,

      --- Simon West <simon.west@...> wrote:
      > I have received a way of reading something from the HTTP headers
      > (thanks Jonathan!), using the on_debug event as follows...
      As always, there is little bit easier way (idea grabbed from examples
      in cookbook: http://cookbook.soaplite.com/):

      use SOAP::Lite +trace =>
      [transport => sub {
      our $header;
      $header = $_[0]->header('Client-Peer') if
      $_[0]->isa('HTTP::Response');
      $_[0]->header('Client-Peer', $header) if $header &&
      $_[0]->isa('HTTP::Request');
      }]
      ;

      > My next question (as is always the case), is how to set one. I'm
      > getting the impression that SOAP::Lite might not be the way to go
      > for
      > this :-( Pity as it's fantastic for regular SOAP stuff...
      This code will work for both, getting and setting headers. Let me
      know if that's not what you want ;)

      Best wishes, Paul.


      __________________________________________________
      Do you Yahoo!?
      Yahoo! News - Today's headlines
      http://news.yahoo.com
    • rjray@blackperl.com
      Actually, I had forgotten to look at the on_debug angle. That s probably the easiest way, certainly easier than creating two different sub-classes (though that
      Message 2 of 6 , Sep 13, 2002
      View Source
      • 0 Attachment
        Actually, I had forgotten to look at the on_debug angle. That's probably the
        easiest way, certainly easier than creating two different sub-classes (though
        that one is more extensible). It is harder to get ones hands into the client
        side of things than on the server side. I have examples in the book that show
        sub-classing the server classes to get access to the HTTP headers, but nothing
        like that for the clients.

        Randy
        --
        """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
        Randy J. Ray rjray@...
        Campbell, CA rjray@...
        <A HREF="http://www.svsm.org">Silicon Valley Scale Modelers</A>
      Your message has been successfully submitted and would be delivered to recipients shortly.