5

I have an endpoint that looks something like this: GET: /v1/resourcebeingcreated/status

Is there a preferred HTTP status code to return (beyond 200 with a response body that explains "in progress") if the loading/creation of this resource is in progress but not complete?

If not, is the best way to return the "in progress" status in a header or the response body?

theMothaShip
  • 1,191
  • 1
  • 12
  • 24

1 Answers1

2
  1. http://en.wikipedia.org/wiki/List_of_HTTP_status_codes#2xx_Success - no. :)
  2. I think it should depend on what you are trying to achieve. Is it that you trying to notify a third party somehow? If you are defining your own API, that would be OK I guess to set it in the header. Yet, a more common and more intuitive approach is the body.
povilasp
  • 2,386
  • 1
  • 22
  • 36
  • That is what I figured, and yes this is to notify a third party of progress of a particular resource... I will probably just return the info in the body like you mentioned. BTW Your grumpy cat avatar is AWESOME! – theMothaShip Nov 30 '12 at 22:17