Using javascript to save XHR file

Viewed 4238

I would like to save an JSON file which is requested on an after-login page with a POST request. Because there is no API available, I would like to download the response of an script called when loading the page as JSON file using Greasemonkey.

The page is like domain.com/map, which calls domain.com/map/script during the load: <script type="text/javascript" charset="utf-8"> function open() {$.ajax{{ url: "/script", type: "POST", dataType: "json",), [...] }); }; function functionname(value){ [...] }; open();. The response of domain.com/map/script is the actual JSON response I would like to save (locally or even better using FTP).

1 Answers
Related