How to set a function that accepts two input files as a REST resource?

I need to set up a function, say compute , that accepts two input files: a plan file and a system file. The compute function uses the system file to find out if a plan can be executed in the plan file or not. It creates an output file containing the result of this check, including recommendations for the plan.

I need to expose this functionality in the REST architecture and not affect the computational function itself (it is being developed by another organization). I can control the interface through which it is available.

What would be the recommended way to expose this feature in the REST architecture?

+4
source share
1 answer

Create a resource / compute that accepts multipart / form-data strong> and POST your files. There is a pretty good and complete formal example of such a REST service here.

+3
source

Source: https://habr.com/ru/post/1307518/


All Articles