Make Content-Type mandatory for REST call activities with body - Mendix Forum

Make Content-Type mandatory for REST call activities with body

13

I've seen more than once that an API that is called using a REST Call activity has a server-side validation on the Content-Type header. If this validation is present during development, the API doesn't seem to work in Mendix because of the missing header (having some HTTP Error Code 400 returned), while it does using Postman, and at some point the developer finds out about the missing mandatory HTTP header.

Now, I recently encountered that such a validation is added later, causing production issues with the integration between the Mendix application and the third-party.

My suggestion is to consider the Content-Type header not as an optional custom header, but as mandatory HTTP header which should always be provided when the body is not empty, i.e. having some template defined.

asked
0 answers