lib/httpx/response.rb in httpx-0.22.2 vs lib/httpx/response.rb in httpx-0.22.3

- old
+ new

@@ -179,9 +179,15 @@ ensure close end end + def filename + return unless @headers.key?("content-disposition") + + Utils.get_filename(@headers["content-disposition"]) + end + def to_s case @buffer when StringIO begin @buffer.string.force_encoding(@encoding)