lib/hyperion/requestor.rb in hyperion_http-0.1.3 vs lib/hyperion/requestor.rb in hyperion_http-0.1.4

- old
+ new

@@ -17,14 +17,15 @@ def request(route, opts={}, &project) Hyperion::Util.guard_param(route, 'a RestRoute', RestRoute) Hyperion::Util.guard_param(opts, 'an options hash', Hash) body = opts[:body] + headers = opts[:headers] || {} additional_handler_hash = opts[:also_handle] || {} render = opts[:render] || Proc.identity project = project || Proc.identity - Hyperion.request(route, body) do |result| + Hyperion.request(route, body, headers) do |result| all_handlers = [hash_handler(additional_handler_hash), handler_from_including_class, built_in_handler(project, render)] all_handlers.each { |handlers| handlers.call(result) }