Interested in sponsoring the site? [find out more]
How to download a file with RestAssured
TLDR; Downloading a file with RestAssured is as simple as taking the body of a request as a byte array and writing it to a file.
When automating I often have to download files. One very common FAQ for WebDriver is “How do I download a file with WebDriver?”.
When would I choose basic HTTP libraries rather than using RestAssured?
TLDR: when I have a small set of HTTP use-cases, and I’m working on fast in-build HTTP integration verification then I’ll probably use HttpURLConnection