I am trying to get plain text via HTTP from JavaScript:
$(function() { $.get("http://mydomain.com/path", function(result) { console.log(result); }); });
The result should be text/html
, but basically it is just a simple key string, without HTML tags. The page is under my control, but comes third-party (closed source), so I can not change the Java that serves this page.
How can I get the contents of this page with JavaScript?
source share