How would I remove the HTTP headers from a Savon request for example
client.request 'v5:ProcessShipments' do
client.http.headers["SOAPAction"] = "example_post"
end
This would generate
DEBUG -- : SOAPAction: example_post
And the server would respond
Server did not recognize the value of HTTP Header SOAPAction: example_post.
However I dont want to have any SOAPAction(s)
I have tried to clear the variable and delete it. I search for a while and couldn’t find anything so I hope this hasn’t been asked before.
Thanks in advance.
If I dont override it then by default Savon will use the client.request ‘v5:ProcessShipments’, which is also incorrect.
Here is a quote from savon documentation for the future references:
By reading savon source code I figured out that Savon::Client#request method sets “SOAPAction” header automatically before it yields a block. I tried to delete SOAPAction header and it worked:
Here is the request it generates:
As you can see there is no SOAPAction HTTP header.
HTH