Link to home
Start Free TrialLog in
Avatar of HLRosenberger
HLRosenbergerFlag for United States of America

asked on

XMLHttpRequest

If I use the XMLHttpRequest object in javascript to POST a blob to the server (see below) , and then the server responds (via Response object) by sending data back down to the client,  how can I access that data through the  XMLHttpRequest object?

JavaScript:

var xhr = new XMLHttpRequest();
xhr.open('POST', 'http://localhost:60421/ProcessBlob.aspx?application=' + application, false);
xhr.send(blob);



VB.NET code:

          Response.ClearHeaders()
            Response.Clear()

            Response.Cache.SetCacheability(HttpCacheability.Private)
            Response.Cache.SetMaxAge(New TimeSpan(0))
            Response.Cache.SetExpires(New DateTime(0))
            Response.Cache.SetNoServerCaching()
            Response.ContentType = "application/pdf"
            Response.AddHeader("content-disposition", "attachment;filename=""airport.pdf""")
            Response.BinaryWrite(FileContent)
            Response.OutputStream.Close()
ASKER CERTIFIED SOLUTION
Avatar of Ryan Friman
Ryan Friman

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of HLRosenberger

ASKER

Thanks!
Thanks!