Giter Site home page Giter Site logo

restclient's People

Contributors

johnclayton avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

restclient's Issues

Make individual requests cancelable

Currently you can only cancel all requests fired for a resource instance. A caller might want more control, for example if a number of requests for the same resource came in all at once and one wanted to keep one alive and cancel the rest.

This will involve returning a token to the caller of the async request methods that can be used to cancel the request as desired.

Add request groups to allow for tracking heterogeneous request clusters

We want to simplify tracking the completion of groups of related requests, which may or may not be for the same resource. Propose we do this by creating RCRequestGroup or something similar that allows callers to register a block that gets run when all the requests in the group are complete.

For example,

[RCRequestGroup withCompletionHandler:^{ <foo> }];

and, we can allow a collection of blocks as well, in addition to setting a flag as to whether they get removed when the group hits zero requests:

[group addCompletionHandler:^{ <foo> } clearWhenDone:YES];

Add support for fixtures

Add support to RCResource so that it can return data from a fixture (.plist) instead of actually running a request. This could be accomplished a couple ways:

[resource addFixture:someObject];
[resource addFixtureNamed:@"Foo.plist"];

We could also have a top-level interface:

[RESTClient loadFixtures:@"Foo.plist"]
[RESTClient userFixtures:NO];

The fixture file in this case could have a list of fixtures for each resource:

<key>http://example.com</key>
<dictionary>...</dictionary>

Expose the request queue from RCResource so a caller can set up their own queues.

Currently when a resource runs a request, it's using the main thread's runloop (instead of the NSOPQ based methods that were new in iOS5) to run the request because of bugs in the NSOpQ.

Confirm the bugs are fixed and run the request on the main Q or a supplied external Q. Also, allow the post-processing Q to be set from outside the request as well. It's currently just using a global concurrent Q.

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.