You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The value of what will be the "content-type" header in the response is clearly "application/json"
When binding that service filter to a route in the config.services object used when constructing the holism server, I am also required to specify the "contentType"
So I have now specified the "content-type" in 2 places, so which value is actually used?
If I change the "contentType" in the binding to something else e.g. "text/html" then the value I actually see when making the request remains "application/json", so clearly the value in the binding is not being used. If I remove, the contentType from "response_properties" then an exception from a filter error for the missing contentType member is thrown and server start fails.
The conclusion is that the "contentType" in the binding is not actually used for the "content-type" header in the response, yet I am still required to provide it.
The text was updated successfully, but these errors were encountered:
Build info:
"appgen": "@encapsule/holistic v0.0.47 alexandrite Jvp9FcdjQNuiXkE2zcUjJA 4854c0117a5fa5e257006b334d52368e1997cfc0 2020-11-01T16:38:28.000Z",
Suppose I have a service filter that serves content of type "application/json" as shown below:
The value of what will be the "content-type" header in the response is clearly "application/json"
When binding that service filter to a route in the
config.services
object used when constructing the holism server, I am also required to specify the "contentType"So I have now specified the "content-type" in 2 places, so which value is actually used?
If I change the "contentType" in the binding to something else e.g. "text/html" then the value I actually see when making the request remains "application/json", so clearly the value in the binding is not being used. If I remove, the contentType from "response_properties" then an exception from a filter error for the missing contentType member is thrown and server start fails.
The conclusion is that the "contentType" in the binding is not actually used for the "content-type" header in the response, yet I am still required to provide it.
The text was updated successfully, but these errors were encountered: