Post Content Empty

0
I have an exposed POST service for a third party app call back. Since migrating to Mendix 8 the content of the request is not coming through When I try using Postman it comes through fine. According to the API dashboard on the third party side, everything was sent properly.  Is there a reason why might strip the content in Mx8?
asked
3 answers
0

In Mendix 8, the HttpRequest/Content is left empty when the Content-Type is multipart/form-data.

You can handle these type of requests in two ways:

  1. The easiest way is to add form parameters to the REST operation
  2. If you want to parse the request content yourself, then you add a body parameter
answered
0

If you set the log to trace what does the logs tell you? Because to me this looks like the other party is at fault here. I can not think of any reason why something on the Mendix end would strip the content. But the logs might tell you something here.

Regards,

Ronald

 

answered
0

Why are you using form-data instead of json via raw json or export mapping?

——

I had the same issue in the past. You need to set your headers (Content-Type and Accept) properly. Also define your body in a correct way, with a correct match to your headers. E.g. if your content-type is application/x-www-form-urlencoded, then you need to set the custom template with an & separated key/value string.

answered