开发者

How to expose a function that takes two input files as a REST resource?

I need to expose a function, let's say compute that takes two input files: a plan file and a system file. The compute function uses to system f开发者_StackOverflow中文版ile to see whether the plan in the plan file can be executed or not. It produces an output file containing the result of this check including recommendations for the plan.

I need to expose this functionality in a REST architecture and have no influence on the compute function itself (it is being developed by another organization). I can control the interface through which it is accessed.

What would be a recommended way to expose this functionality in a REST architecture?


Create a /compute resource that accepts multipart/form-data and POST your files to this. There is a fairly good and complete form based example of just such a REST service here

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜