httpレスポンスがapplication/pdfだったときとかの対応
resp = http_client.get url
resp.headers["content-type"]
# => "application/pdf"
# シンプルに書き込めばok
file = File.open("path/to/pdf", "wb") do |f|
f.puts resp.body
end
$ file path/to/pdf
# path/to/pdf: PDF document, version 1.4