How to send HTTP GET requests to use an online leaderboard service?

Hi !
Is it possible to use the service offered by this site in Armory ?
Site :
The service is available through HTTP GET requests :
Everything seems so easy, but how to use it in Armory ?
Having leader-boards in our games would be so nice…

Hi, I have no experience with networking, but this might help you:


Then you can parse the received data as json (e.g.)

Thanks @timodriaan, it will sure help.

If someone could provide a short working example, it would be very nice.

I was wrong in my last answer, sockets are not the way to go here. There is this library that allows you to create http requests:

Just clone or download and unzip it, put it in your libraries folder and you’re ready to go. Unfortunately, it doesn’t seem to work with Krom.

Example trait (note that it didn’t work to set scoreboard entries, I don’t know why):

package arm;

import restclient.RestClient;

class Scoreboard extends iron.Trait {

	public function new() {

		notifyOnInit(function() {
			// I could not get this working... RestClient.put() also didn't work, the 
			// website says you should use get requests all the time.

			// Get the scoreboard as json
				function(result) {


Networking is impossible on Krom:

1 Like

What a bad new :frowning:
Are you absolutely certain it can’t be done ? Could it work when exporting to html5 ?
If really nothing can work, what is missing ?

The html5 target isn’t Krom, so that works, yes.

I confirm it could work on HTML5 :slightly_smiling_face:
HTTP request does not work in Krom, but work in HTML5.

When using this haxe trait on HTML5 it returns well your IP :

var http = new haxe.Http("");

		http.onData = function (data:String) {
		  var result = haxe.Json.parse(data);
		  trace('Your IP-address: ${result.ip}');

		http.onError = function (error) {
		  trace('error: $error');


So… in theory, High scores tables are possible in HTML5.

Now, the UI will be the hard task…