3 ms·
We wrap the response body because it's important to give clients of an API endpoint, something that they will use to query/modify data, a clear indicator of the
by bcrosby95 5y ago
We wrap the response body because it's important to give clients of an API endpoint, something that they will use to query/modify data, a clear indicator of the application response status. We do this in the response body because http status codes aren't good enough, and people tend to miss headers. It's hard to miss it when it's part of the body.
And no, we don't do that for static content for a simple reason: static content isn't served from our API servers.