How to perform a savon client.call use a GET request with a payload instead of a POST?

93 Views Asked by At

I'm using savonrb (2.1.2) to perform my SOAP requests against a Web Service.

The problem I came into is that it looks like I do not have any chance to perform an HTTP GET request instead of a POST request using this library.

Please, note that even though I can agree with the fact that a SOAP over HTTP done through a GET method, instead that through a POST, might look unconventional or even an error, but

I cannot modify the server side, and, as client, I MUST accept this behavior as a matter of fact.

How can I overcome this problem?

Standing to what I've seen so far inside the code of savon, it looks like it is an immutable design decision:

  # operation.rb
  module Savon
    class Operation
      ...
      def call_with_logging(request)
        @logger.log(request) { HTTPI.post(request, @globals[:adapter]) }
      end
      ...
    end
  end

I just wonder if there should be a trick, through the mechanism of the savon adapters, to avoid this kind of (bad) solution.

0

There are 0 best solutions below