Found a solution for saving the file, and it if possible in Scenario 1.
- In Octet-stream you will be receiving the response as "Encoded Binary Data"
- Your need to convert the response data into "Decoded Base64 String"
- Finally save it as PDF
Also we can use NPM package - Base64toPDF for making the listed process as automated.