You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, while updating our tests in Faraday, I noticed a strange behaviour from Patron.
It seems like when providing a body (data) to a patch call, the body gets discarded, hence WebMock raises an exception.
The some doesn't happen, however, for other methods including put.
At first I though Patron wasn't working properly, so I opened an issue there, but it turned out Patron is indeed sending the body correctly. So I suspect it's WebMock not detecting it properly.
Below a script to reproduce the issue (plus a working script with put method).
The same doesn't happen, however, if we use :put instead of :patch.
require'patron'require'webmock'includeWebMock::APIWebMock.enable!stub_request(:put,"http://example.com/").with(body: {"name"=>"zack"})session=Patron::Session.newsession.put('http://example.com',"name=zack")# No exception raised
The text was updated successfully, but these errors were encountered:
Thanks @bblimke! Glad to know this was addressed!
I'll give it a try and feedback here as soon as possible.
Will also close the issue on successful feedback
Hello, while updating our tests in Faraday, I noticed a strange behaviour from Patron.
It seems like when providing a body (data) to a patch call, the body gets discarded, hence WebMock raises an exception.
The some doesn't happen, however, for other methods including put.
At first I though Patron wasn't working properly, so I opened an issue there, but it turned out Patron is indeed sending the body correctly. So I suspect it's WebMock not detecting it properly.
Below a script to reproduce the issue (plus a working script with put method).
Patron version: 0.12.1
WebMock version: 3.3.0
Script to reproduce:
The same doesn't happen, however, if we use
:put
instead of:patch
.The text was updated successfully, but these errors were encountered: