Bartosz Blimke
Bartosz Blimke
I see. Yes, regexp would have worked before as it doesn't care about boundaries. Perhaps the error should be raised only if trying to match body against hash.
@sshaw it works only because most likely your http client creates part boundary strings which are the same for every request, therefore the generated body is always the same. This...
Right, that works too :) You can use regexp to match body without a block. Webmock supports body to be declared as regexp. On Tue, 3 Jan 2017 at 17:41,...
@russell it's because of this part `.with(body: %r[.*],` please remove `body: %r[.*]` completely. It's not necessary since you are matching body inside the block anyway.
@adamgaynor thank you. The change looks useful, though I'm not sure if modifying request_signature objects is a good idea, just because printing the signature failed.
Please have a look at https://github.com/bblimke/webmock/pull/427 If response body is declared as a hash, it's not clear what should the hash be encoded to. JSON, XML, or perhaps url params?...
"If a server is actually returning JSON as the body content" - which server do you mean? We are returning a stubbed response. This response will be passed through specific...
In case there is response content type declared it could work. Webmock would have to raise an error is case body is declared as a hash and headers are not...
Most people will forget about headers.
I don't think it's a problem either, as long as user gets a clear error message explaining content type needs to be added if missing. Pull request would be most...