Prerequisites:
204 No Content code, Content-Type: application/json headers and empty body.Steps to Reproduce:
POST http://host.tld/some-api HTTP/1.1
Content-Type: application/json
{}
Actual behaviour:
The content type of response is application/json, while response body is not a valid json string.Expected behaviour:
Comments:
As per RFC 2616, the server can respond with both Content-Type header and empty body under 204 HTTP code. Please see these links for details:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.5
http://www.w3.org/Protocols/rfc2616/rfc2616-sec7.html#sec7.1
Suggested changes:
@YBogomolov nice catch, I have fixed this issue and will publish it in the next release.
@YBogomolov you can verify this in the latest version 0.24.0
@Huachao It works as intended, thank you!