Hi Mark,

I try to use asynchronous SOAPHTTP transport for XML::Compile::SOAP. I
would like to preset some HTTP headers (basic auth, ...), but I found it
hardly possible.

$guard = http_request $request->method => $request->uri
         , body    => $request->content
         , headers => $request->headers
         , $self->anyEventParams
         , $handler;

As you can see in code XML::Compile::Transport::SOAPHTTP_AnyEvent via
anyEventParams attribute you can only add more arguments to http_request
call you cannot change the headers.

Could it be possible to add an optional user_agent (ua?) parameter for
XML::Compile::Transport::SOAPHTTP_AnyEvent constructor. This parameter if
supplied would be an anonymous subroutine to be used to send the request
instead of AnyEvent::HTTP::http_request

my $ua = $self->{ua} || \&AnyEnvent::HTTP::http_request;
$guard = $ua->($request->method => $request->uri
         , body    => $request->content
         , headers => $request->headers
         , $self->anyEventParams
         , $handler);

Thanks for any reply,

Roman Daniel
_______________________________________________
Xml-compile mailing list
[email protected]
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/xml-compile

Reply via email to