pact-specification icon indicating copy to clipboard operation
pact-specification copied to clipboard

Content-Type resolution

Open 0xorial opened this issue 6 years ago • 3 comments

From specs

If the Content-Type header, is not present, then:

1. OPTIONAL - The content type can be determined from the first few characters of the body (know as a magic number test).
2. default to either application/json (as V1) or text/plain.

Shouldn't specification be specific about that? For example now I assumed "application/json" by default, so my implementation conforms to specs, but it fails some test-cases, because they assume "text/plain" by default.

0xorial avatar Jun 22 '18 08:06 0xorial