Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass doc to on_before_dispatch #37

Merged
merged 1 commit into from Nov 6, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/handsoap/service.rb
Expand Up @@ -244,7 +244,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)
Expand Down Expand Up @@ -299,7 +299,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
Expand Down Expand Up @@ -361,7 +361,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.
#
Expand Down