Code Monkey home page Code Monkey logo

hateoas-client-js's People

Contributors

dracoblue avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

hateoas-client-js's Issues

Make rest-client.js available via bower

It would be nice if rest-client.js was available via bower.

A proper name is "rest-client-js". I registered the package already.

$ bower info rest-client-js
bower cached        git://github.com/DracoBlue/rest-client-js.git#0.1.0
bower validate      0.1.0 against git://github.com/DracoBlue/rest-client-js.git#*

{
  name: 'rest-client-js',
  homepage: 'https://github.com/DracoBlue/rest-client-js',
  version: '0.1.0'
}

Available versions:
  - 0.1.0

Cache calls to a given URL

The first call to agent.get() should store the response (or the parsed result) and subsequent calls should return the cached result.

Perhaps supply a .refresh() or .reset() method to delete the cache?!

Use jQuery promise

Hi

First off I wanna say I really like the idea of HAL and this generic rest client. I've been looking for something like this for a while.

There are some improvements to this project I'd like to make. I might end up writing a variant of this but thought I'd share my ideas and see what you thought.

Instead of (or as well as) using callbacks, return the jQuery promise from $.ajax()

This would allow the following:

agent.get()
  .then(myFn)
  .then(myFn2)

Make HttpAgent immutable

When calling agent.navigate() return a new HttpAgent and leave the original unchanged.

This would allow users to cache agents which point to different resources.

var root = new HttpAgent('/api');

var products = root.navigate('products'); // /api/products

var orders = root.navigate('orders'); // /api/orders

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.