I have a request (POST) which creates a resource. This resource takes a long time to create (up to hours), but its id is created immediately.
It seems to me the most appropriate flow is:
POST /thing - response is 201 Created with "URI for the resource given by a Location header field" (as per http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html)
Start polling GET /thing/id to which the response should be:
As long as resource has not been prepared - 204 No Content
Once the resource is ready - 200 OK with the resource returned in the response body
I am seeking opinions/ advice because I am basing my opinion on (a lot) of reading and less so on experience and this seems different from most recommendations to initially return a 202 Accepted and to use 204 only in response to http DELETE