JSFiddle - React, Tailwind, and code Playground

by Mykola Senyk

JavaScript

$(function() {
    var url = 'http://premium-api.com/dyn/reversi/';
    var gameId = '123';
    var game = {about: "It is game for save"};
    // save example
    $.post(url + "save/" + gameId, JSON.stringify(game))
    .done(function(res) {
        console.log('Save: ' + res.success);
    });
    
    // load example
    $.get(url + "load/" + gameId)
    .done(function(res) {
        console.log(res);
    });
});