Some services may not want to keep a connection open to wait for the result after sending the image. Add an optional parameter in the POST request handler to return a job UUID immediately. You should set up an endpoint at /jobstatus that takes a GET request with a string field "jobId", which is the UUID of any running job. The endpoint should either return a 404 error if the results aren't available yet, or the result if the evaluation is complete.
Some services may not want to keep a connection open to wait for the result after sending the image. Add an optional parameter in the POST request handler to return a job UUID immediately. You should set up an endpoint at
/jobstatus
that takes a GET request with a string field "jobId", which is the UUID of any running job. The endpoint should either return a 404 error if the results aren't available yet, or the result if the evaluation is complete.