TLDR; Is the Content-Disposition
header supported in web trigger response headers?
I want to return a file from a web trigger call.
Web trigger could be: https://ab6e087a-85df-461e-b8ad-e2484c636ba4.hello.atlassian-dev.net/x1/kxXiKQ38Oyx0-p5fYSAVbEVXiBw
For simplicity let’s assume a simple text file.
I can return the file with the header like this:
headers: {
"Content-Type": ["text/plain"],
}
But since web triggers always have the same URL the file name would be kxXiKQ38Oyx0-p5fYSAVbEVXiBw - so I want to return a Content-Disposition header alongside.
headers: {
"Content-Type": ["text/plain"],
"Content-Disposition": "attachment, filename='test123.txt'"
}
But this seems to result in HTTP status 424 Failed Dependency
and an empty body.
Any ideas? How can we return a file from a forge web trigger?