Hi, I have a following problem, and I don’t really know how to chew on it. I make json requests (via affjax) to a Haskell backend and one of the endpoints returns a StreamPost response. Ideally, I would like to be able to save that response to a file - so that when the user clicks a button, the file gets saved the same way as if he clicked some link to the pdf on a webpage. Does Affjax even support such streamed-payload, or do I have to load the whole payload to the memory? Files can be quite big (up to 1-2GB). Or perhaps I should use another library to handle that?
I use halogen for UI, if that’s relevant for the question.