Upload files using REST Call Error

0
There is an external API, the parameter is a file, in Mendix using Call Rest to call this API has not been successful, from the console to see the following error:   An error has occurred while handling the request. [User 'ShenS61' with session id 'd7cbc4d2-XXXX-XXXX-XXXX-XXXXXXXX15ff' and roles 'OMTUser'] -------- com.mendix.modules.microflowengine.MicroflowException: Error calling REST service    at OCRRecognition.ACT_OCR_Upload (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 OCRRecognition.ACT_OCR_Upload (CallRest : 'Call REST (POST)') Advanced stacktrace:    at com.mendix.integration.actions.microflow.RestCallAction.checkStatusCode(RestCallAction.scala:117)   below is Call Rest action
asked
2 answers
0

below is Rest Call and External API

imageimage

answered
0

Hi Shicheng,

Can you show your call REST activity? Create a log message under the call REST, change the log level to error and check the logs.

Since, it shows 400 bad request may be the format will be wrong,

answered
0

The Call Rest action as below: 

屏幕截图 2023-12-20 133911.png

answered