How to download attachment with HTTP Response Handler library? Follow
I did look through this section https://www.jetbrains.com/help/idea/http-response-handling-api-reference.html and this one as well https://www.jetbrains.com/help/idea/http-client-in-product-code-editor.html and this one too https://blog.jetbrains.com/phpstorm/2018/04/handling-reponses-in-the-http-client/
In short, none of them mentioned anything regarding how to handle response, that has `Content-Disposition` header indicating, that response is attachment and therefore e.g. browser triggers file download.
Can it be achieved at the moment or should it be a feature request?
Please sign in to leave a comment.
Hello Jevgeni Serkin,
Does https://youtrack.jetbrains.com/issue/IDEA-239333#focus=Comments-27-3512011.0-0, look like your case?
Hmmm. Not sure. Maybe it is one and the same. I see, that in provide case, response header is
But in my case it is
Maybe it is same as
If I disregard this, then it does look like what I was asking about.
As I can see, there may be different scenarios. The initial problem is that when you download the attachment, the response just prints in the console?
Correct. Well for me it just creates *.txt file at the moment. Like in case of a JSON response it create a timestamped .json file.
Thanks for the information. Please follow https://youtrack.jetbrains.com/issue/IDEA-239333, for updates. I've added a private comment to the issue for collecting more details.