Permalink
Browse files

Merge pull request #37 from covermymeds/on-before-dispatch-gets-doc

Pass `doc` to `on_before_dispatch`
  • Loading branch information...
2 parents e2414c0 + 2511a03 commit 0eea48b9832a0d3918814557c6c1e0035235e25b @troelskn troelskn committed Nov 6, 2013
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/handsoap/service.rb
View
6 lib/handsoap/service.rb
@@ -257,7 +257,7 @@ def invoke(action, options = { :soap_action => :auto, :http_options => nil }, &b
"Content-Type" => "#{self.request_content_type}; charset=UTF-8"
}
headers["SOAPAction"] = options[:soap_action] unless options[:soap_action].nil?
- on_before_dispatch
+ on_before_dispatch(doc)
request = make_http_request(self.uri, doc.to_s, headers, options[:http_options])
response = http_driver_instance.send_http_request(request)
parse_http_response(response)
@@ -312,7 +312,7 @@ def async(user_block, &block) # :yields: Handsoap::AsyncDispatch
"Content-Type" => "#{self.request_content_type}; charset=UTF-8"
}
headers["SOAPAction"] = options[:soap_action] unless options[:soap_action].nil?
- on_before_dispatch
+ on_before_dispatch(doc)
request = make_http_request(self.uri, doc.to_s, headers)
driver = self.http_driver_instance
if driver.respond_to? :send_http_request_async
@@ -374,7 +374,7 @@ def on_create_document(doc)
# Hook that is called before the message is dispatched.
#
# You can override this to provide filtering and logging.
- def on_before_dispatch
+ def on_before_dispatch(doc)
end
# Hook that is called after the http_client is created.
#

0 comments on commit 0eea48b

Please sign in to comment.