title: Download a PDF file and capture the filename
body: <p>I have a URL to a PDF resource but it is not identified by it's filename. The request looks like this:</p>
  
  <pre><code>GET /api/docs/12345
  Accept: application/pdf
  </code></pre>
  
  <p>And the response is:</p>
  
  <pre><code>Status: 200 OK
  Content-Type: application/pdf
  Content-Disposition: attachment; filename="sample.pdf"
  </code></pre>
  
  <p>When I invoke the api with Postman, it will prompt to save the file with a default filename of "response". So the file get's save as "response.pdf". I need to do this programmatically using a RestTemplate client. How can I capture the response, so I can extract the filename (like in the above response it is sample.pdf) and I can save the file accordingly and not a generic filename such as "response.pdf"</p>