Skip to content

Commit fa1d712

Browse files
committedSep 10, 2020
feat: support webdav http methods
1 parent bac99da commit fa1d712

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎lib/pact/provider/test_methods.rb

+5-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ def replay_interaction interaction, request_customizer = nil
2121

2222
logger.info "Sending #{request.method.upcase} request to path: \"#{request.path}\" with headers: #{request.headers}, see debug logs for body"
2323
logger.debug "body :#{request.body}"
24-
response = self.send(request.method.downcase, *args)
24+
response = if self.respond_to?(:custom_request)
25+
self.custom_request(request.method.upcase, *args)
26+
else
27+
self.send(request.method.downcase, *args)
28+
end
2529
logger.info "Received response with status: #{response.status}, headers: #{response.headers}, see debug logs for body"
2630
logger.debug "body: #{response.body}"
2731
end

0 commit comments

Comments
 (0)