Skip to content

Instantly share code, notes, and snippets.

@mamund
Last active January 1, 2016 11:59
Show Gist options
  • Save mamund/8141196 to your computer and use it in GitHub Desktop.
Save mamund/8141196 to your computer and use it in GitHub Desktop.
sample client code for hypermedia API
var thisPage = function() {
var g = {};
g.msg = {};
g.addUrl = '/tasks/';
g.listUrl = '/tasks/';
g.searchUrl = '/tasks/search?text={@text}';
g.completeUrl = '/tasks/complete/';
function init() {}
function refreshList() {}
function searchList() {}
function addToList() {}
function completeItem() {}
function showList() {}
function initButtons() {}
function clickButton() {}
function makeRequest(href, context, body) {}
function processResponse(ajax, context) {}
var that = {};
that.init = init;
return that;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment