Jump to content

Consuming REST service from Phaser


piedrahitac
 Share

Recommended Posts

Hello everyone,

 

I was wondering what is the best way to consume a REST service from Phaser.

 

So far, I have been able to receive data from the server by using:

game.load.json('data', '/path/to/rest/service');

But I'm also going to need send data to the server, so I wonder if there's a correct way to do it in Phaser. Right now, I'm using jQuery as an alternative, but I have also been trying out AngularJS.

 

Any ideas, opinions or feedback are very welcome!

Link to comment
Share on other sites

Phaser doesn't have any specific AJAX code and the loaders are set up to load and cache static assets, so they're not really that useful for consuming APIs. I've been using Zepto or jQuery to do this kind of stuff. AngularJS, Ember, Backbone etc can also be used if you want more structured data.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...