I have noticed that box has started to return 202 status codes on what appears to be a random basis on file upload API calls. It appears that when this code is returned the file upload has not been completed successfully, so a retry of the attempted operation is necessary. Here’s an example response I am seeing:
["body"]=>
bool(true)
["header"]=>
string(211) "HTTP/1.1 202 Accepted
Server: nginx
Date: Mon, 07 Jan 2013 23:14:08 GMT
Content-Type: text/html; charset=utf-8
Connection: keep-alive
Cache-control: no-cache, no-store
Retry-After: 4
Content-Length: 0"
Given the ambiguous nature of a 202 response does anyone know what the technically appropriate response to this status code is?
You can see the full explanation in the Download a File Section (we didn’t put it in the upload section but are now)
More or less this means that you’ll have to wait ‘Retry-After’ seconds before you can actually download the file. Most apps won’t need to immediately download the file, but in the event that one does, it needs to handle this response properly.