I call a third-party API in my application and I need to return the response the same way it's received to from my API. How do I do that?
This is the response object from the third-party:
Cache-Control: private, must-revalidate, max-age=0, s-maxage=0
Transfer-Encoding: chunked
Content-Type: application/pdf
Expires: Wed, 29 May 2024 18:54:09 GMT
Last-Modified: Wed, 29 May 2024 18:54:09 GMT
ETag: "2105551196"
Vary: Cookie,Accept,Accept-Encoding
Server: Microsoft-IIS/10.0
Content-Disposition: attachment; filename=ACH_insert_update_12-29-23.pdf
X-Powered-By: ASP.NET
Date: Wed, 29 May 2024 18:54:09 GMT```
And the body is obviously the file. I've tried...
```TS
return response
.contentType(file.contentType)
.setHeader('Content-Disposition', file.contentDisposition)
.send(file.buffer)
using @Res({ passthrough: true }) response: Response with import { Response } from 'express'