djax-client
A straightforward services client powered by djax.
Example
var Client = ; // Creating the clientvar client = // Client's settings settings: baseUrl: 'http://localhost:8000' engine: $ajax scope: null solver: /\:/g // Default call options defaults: type: 'GET' dataType: 'json' params: param: 'item' { return 'user'; } // Defining our services services: getItem: '/item/:id' getUser: url: '/:param/:id' { console; } createItem: url: '/:dynamicParam' type: 'POST' headers: { return model; } 'X-Option': 'hello!' ; // Using the clientclient; client;client; // etc.
Development
# Building npm run build # Testing npm test # Linting npm run lint # Working (localhost:7337/static/unit.html) npm run work
License
MIT