Has anyone run into an issue like this? Any ideas?
Dusk - how to download a file served by external API?
I've just started using Dusk and I am trying to download base builds to run tests on from an external page that requires authentication.
The URL looks like this: https://example.address.com/download/b80950ca-4a3a-11e8-9c79-02c10f456dba/358871cbbc2d277990ddae80fb67e0c5
It is dynamically generated, it sends headers to download a ZIP archive and it requires you to be authenticated.
I have tried many methods that I could find, including Guzzle, CURL, file_get_contents(), copy() and fopen(). All of them merely create a few KB or B sized file that seems to just contain some HTML or HTTP information.
If you haven't come across a way to downloads a file in a scenario like this, maybe you know of a clever way to take the authentication state or certain headers from Dusk and throw that into a separate CURL request to make it download the file that URL serves?
Please or to participate in this conversation.