I have a POST AJAX request in my ASP.NET MVC application, that works like this:
$.ajax({
type: "POST",
url: 'https://localhost:44300/api/values',
data: ruleData,
contentType: "application/json; charset=utf-8"
});
In this case, ruleData
encompasses a JSON blob:
var ruleData = JSON.stringify({
'TargetProduct': "SomeProduct",
'Content': editor.getValue(),
'TargetProductVersion' : "1.0"
});
The request is backed by a POST handled in a Web API application, that returns PushStreamContent
with appropriate headers.
return new HttpResponseMessage(HttpStatusCode.OK) { Content = pushStreamContent};
In Fiddler, I see the response from the Web API coming back as application/octet-stream
, in the right size as I was expecting (it generates a ZIP file in the backend), however there is never a dialog shown to allow the user to download the file.
What am I missing?