Method: HTTPX::Response::Body#filename
- Defined in:
- lib/httpx/response/body.rb
#filename ⇒ Object
returns the declared filename in the “contennt-disposition” header, when present.
103 104 105 106 107 |
# File 'lib/httpx/response/body.rb', line 103 def filename return unless @headers.key?("content-disposition") Utils.get_filename(@headers["content-disposition"]) end |