0

Is this possible? If not what are some alternatives..

Simply I want to send a GET request to

 //steamgaug.es/api/v2

"ISteamClient": {
        "online": 1
    },

and have it respond to this i.e

if ISteamClient online:1

then make it do something

We Are All Monica
  • 13,000
  • 8
  • 46
  • 72
Spaccee
  • 125
  • 1
  • 1
  • 8

1 Answers1

2

It's not possible with HTML. But it is definitely possible with Javascript, which you can add to any HTML code.

For code example please refer to this stackoverflow thread!

Your code will probably look like this:

<html>
<body>

<script>
var text = httpGet("https://steamgaug.es/api/v2");

obj = JSON.parse(text);

alert(obj.ISteamClient.online);

function httpGet(theUrl)
{
    var xmlHttp = new XMLHttpRequest();
    xmlHttp.open( "GET", theUrl, false ); // false for synchronous request
    xmlHttp.send( null );
    return xmlHttp.responseText;
}
</script>

</body>
</html>
Community
  • 1
  • 1
Philipp
  • 189
  • 1
  • 10