-
Notifications
You must be signed in to change notification settings - Fork 299
Open
Labels
Milestone
Description
Related to #6561
For some tests that make a post
request with an empty request body, the contentType is not being set.
Example test:
uri: "/parameters/body-optionality/optional-explicit/omit", | |
method: "post", | |
request: {}, | |
response: { | |
status: 204, | |
}, |
However the current http-server-js emitted code will only run the generated handler for the above scenario if the content-type is present and set to application/json
.
I'd expect that when the request body is optional, the content-type header may be optional when the body is not provided.