How to add form-data in POST Request

Hi all, I am trying to send “form-data” in a POST Request via Mendix (e.g. name = MyName). I achieve the desired result with Postman. In Mendix I try to achieve this in a Microflow with a “CALL REST (POST)” action and by Adding a HTTP Header with Key “Content-Type” and Value “'application/form-data'” (of course w/o the “) and by adding the following in the tab “Request”: “name=myName”   Unfortunately that does not work out. Any ideas?   Thanks and best regards, Tobias        
1 answers

Hi Tobias,

This is the correct approach so I am not sure why it is not working. Can you be more specific what happens? Maybe you can post your error message. You can also check the following things:

  • Make sure it is a post request as opposed to a get or something else (under General)
  • Try setting the header content-Type to 'application/x-www-form-urlencoded'
  • Make sure that whatever you are sending as value is safe to send in a URL by using `urlEncode`

Hope this helps,