Skip to content

Use jQuery promise #3

@jamesfoster

Description

@jamesfoster

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions