Post Rest Service for upload file

0
I am trying to call rest service where i need to upload file but getting below error using form data, suggestion pls  getting below err: An error has occurred while handling the request. [User 'Anonymous_bc091d42-4dbe-4441-a9e3-793f701e802a' with session id '066a2e55-XXXX-XXXX-XXXX-XXXXXXXX498e' and roles 'Administrator'] -------- com.mendix.modules.microflowengine.MicroflowException: Error calling REST service     at MyFirstModule.CALL_UPLOAD_API (CallRest : 'Call REST (POST)') Advanced stacktrace:     at com.mendix.integration.actions.microflow.RestCallAction.execute(RestCallAction.scala:79) Caused by: com.mendix.modules.microflowengine.MicroflowException: 400: Bad Request     at MyFirstModule.CALL_UPLOAD_API (CallRest : 'Call REST (POST)') Advanced stacktrace:     at com.mendix.integration.actions.microflow.RestCallAction.checkStatusCode(RestCallAction.scala:117)  
asked
1 answers
1

The 400 Bad Request is coming from the server you are trying to upload to. This is saying the request from your Mendix application has been sent in an incorrect format.

In your Mendix app you can turn up the Log Level of the REST Consume log node to TRACE to see exactly what your application is sending and the response from the remote server. If you are working locally this will be in the console of Studio Pro. Hopefully you’ll see what is going wrong with the request in your logs now.

Good luck!

answered