api/client: close the returned io.ReadCloser Upstream-commit: 159e830068b46793a51f6104802b299c3a10fb7b Component: engine