-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
POST request without content-type sends empty body #386
Comments
I am unable to replicate this. If this behavior is happening, it is not in the Rust core. Given that Pact file, here is the request made by the verifier:
and then by the mock server:
As there is no content type, the mock server automatically detects it as JSON. It may be the client language HTTP code is not reading the body if there is no content type. |
hmm thanks for confirming this. Also silly me, I haven't linked this to the source of the request. Off to search github issues / slack! |
Given this pact file:
No body will be sent via the verifier. When:
is added to the request section of the pact, it will send it.
This makes some sort of sense, however it raises the question as to how we should provide this feedback, especially in the FFI world where the pact is built up gradually where such validations could only happen later on.
Perhaps a warning could be emitted during the "start mock server" stage or perhaps also even on the provider side during verification?
The text was updated successfully, but these errors were encountered: