On click on download button I need to “GET” an xml file from rest api url (http://localhost:xxxx/xx.xml) and save it on users desktop. How do I achieve this in javascript. Thanks.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
if you have control over the webhost, send the header:
You could also use AJAX call and something like the downloadify flash object. Other than these there is no native way to force the downloading of a file