How do I return an instant REST OK 200 with the new REST implementation in Mendix 7

0
A lot of webservices expect a 200 response instantly. The new way of publishing rest services, the HTTP response code is set through just returning the HttpResponse object from system at the end of the microflow. But if you do any pre-processing of the data in that same microflow, you're stuck waiting for the time that microflow takes to execute for the end point to be reached. How can I circumvent this, and just return the response code instantly?    
asked
3 answers
2

I wouldn't recommend this solution, because you didn't check the content and it may clog up your memory, but the fastest way to respond with a 200 OK is like this: https://modelshare.mendix.com/models/b3532aad-4103-48ae-89ce-5788e83224f9/post200asap

 

answered
0

Do the preprocessing in a process queue?

answered
0

Why would you return 200 before you know that the message has been received?
Do the minimum amount of work to assure that the message has arrived and is safely in the queue, and then return 200. If you don't, you might run into an exception when you have already returned 200, and you've lost the data.

answered