I'm trying to fetch some simple text over HTTP from JavaScript:
$(function() {
$.get("http://mydomain.com/path", function(result) {
console.log(result);
});
});
The result should be text/html
, but is basically only a simple key-value string, no HTML tags whatsoever. The page is in my control, but is supplied by a third-party (closed-source) so I can't modify the Java that serves out this page.
How can I get the contents of this page from JavaScript?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…