by kortex · 4y ago · 0 comments
{"data": <base64_encoded_video>, "status": "whatever"}
Of course not!You already have an envelope, it's the HTTP protocol. The real trick is generically mapping data structures to HTTP responses with headers. In fact HTTP-response-shaped-objects make halfway decent general purpose envelopes in the business logic itself. They are basically Result[T, E] but with even more metadata available.
And no, we don't do that for static content for a simple reason: static content isn't served from our API servers.