Hi there,
You can Base64 encode your file and send it throught your endpoint. On the other side of your endpoint, you would just need to re-encode the file.
I believe if you try to send your document directly as a response, it will send your document's binary