202 Accepted and a status URL for anything that takes seconds
Holding an HTTP connection open for a thirty second job times out somewhere between the client and you. Accept the job, return where to look, and do the work off the request.
POST /exports → 202 Accepted, Location: /exports/8f2a
GET /exports/8f2a → 200 { status: "running" } … { status: "done", url: … }The client polls or subscribes. The job survives a dropped connection, which the synchronous version never does.
httpapi-design