alecgorge / jsonapi

A JSON API for Minecraft: http://forums.bukkit.org/threads/admn-info-jsonapi-v1-3-1-json-http-and-socket-api-for-controlling-a-server-740.14270/
http://mcjsonapi.com
MIT License
231 stars 88 forks source link

Make calls to jsonapi using Javascript #468

Open ersgonzalo opened 8 years ago

ersgonzalo commented 8 years ago

Hey Mates,

I'm a bit unsure of how to make calls to the JSON Api on my server using Javascript. I want to make more information available on my server's website and take it from the server itself without having to use external services. If this information is documented in the Wiki forgive me for my ignorance but I can't seem to find any at the moment. From what I can gather, process for making a call to a Minecraft server seems to be as so:

However, I seem to get errors with my server and nothing is returned from my get requests. Could I get some help with this?

krisdb2009 commented 8 years ago

What are the errors?

ersgonzalo commented 8 years ago

I get two errors:

Kworz commented 8 years ago

Better use Websockets :) but you will have to use CryptoJS / Other SHA256 crypting system

var socket = new WebSocket("ws://****YOURIP****:20061/");