We're looking at creating a web services/REST API layer that will be consumed by web and mobile clients.
To make the solution more robust I was considering putting the commands from PUT, POST, and PATCH onto a message queue, which would mean that they would then be executed asynchronously.
Is there a standard HTTP response from a RESTful API that indicates that a command will be executed asynchronously?
Edit
Actually, if anyone had any thoughts on how sensible it is to have a message queue behind a web services layer I'd be interested to hear them.
Best Answer
The successful creation of the task to do whatever was successful. This means that one should be looking in the
2xx
block of the response codes.In this block one jumps out as the correct answer quite quickly:
You may also wish to look at the
201
response for situations where the resource (the task) has been created, and you just want to say that.This, however does not imply the asynchronous nature of the interaction and instead implies that it is there, somewhere.