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

3986Re: [soaplite] changing Accept: headers

Expand Messages
  • Byrne Reese
    Oct 8, 2004
      Currently in 0.60, this capability is not easily accomplished. In fact you identified the only way to do it: subclass SOAP::Transport::HTTP::Client.

      But in SOAP::Lite 0.65 due out next week, this capability has finally been added. In fact, SOAP clients finally have direct access to the HTTP::Request and HTTP::Response objects making a great many things easier to do - i.e. setting cookies, reading or writing response content. You name it.

      For example, to change the Accept headers, one would do the following:

      my $client = SOAP::Lite
      $client->transport->http_request->header(Accept => ['text/xml', 'multipart/*', 'application/soap', 'text/plain']);


      Anyway, I know this is a response to an "old" question, but I thought I would let you know that the newsgroup is being read, bugs fixed, and features being added.

      Andrew Moore wrote:

      Hi -

      I'm working with an IBM redback application server from a SOAP::Lite
      client. The server doesn't seem to like the default Accept: headers that
      SOAP::Transport::HTTP produces. I'd like to be able to remove the
      "Accept: multipart/*" header since it appears to confuse the server.
      Yes, I am apparently working aruond a bug in the server.

      Rather than subclassing SOAP::Transport::HTTP and overriding the
      send_receive() method in it to fix the headers, is there a way to adjust
      the headers generated in SOAP::Transport::HTTP? I notice that they are
      made with
      $req->header(Accept => ['text/xml', 'multipart/*']);
      but I can't seem to specify an alternative Accept header.

      Any ideas?


      Yahoo! Groups Links

    • Show all 4 messages in this topic