I Have two API's one is basically for generating PDF's basing on the data sent.
This first API endpoint below
http://localhost:5000/api/sendReceiptData
Returns a PDF file as an attachment.
The second API will consume the first API and should return a PDF as an attachment in the response. I have tried it out but I get this error TypeError: Object of type bytes is not JSON serializable
How can I therefore return a file response from the first API within this second API