lib/apidiesel/handlers/http_request_helper.rb in apidiesel-0.11 vs lib/apidiesel/handlers/http_request_helper.rb in apidiesel-0.12
- old
+ new
@@ -20,9 +20,13 @@
http_request.auth.ssl.verify_mode = api_config[:ssl_verify_mode] || :peer
http_request.open_timeout = api_config[:timeout] || 30
http_request.read_timeout = api_config[:timeout] || 30
+ if block_given?
+ http_request = yield http_request
+ end
+
request.http_request = http_request
begin
response = HTTPI.request(request.action.http_method, http_request)
request.http_response = response
\ No newline at end of file