fivesquaresoftware / restclient Goto Github PK
View Code? Open in Web Editor NEWSimple, powerful HTTP client for Cocoa+REST geeks
Simple, powerful HTTP client for Cocoa+REST geeks
You could store an entire configuration of resources to disk if you wanted ...
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.
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 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>
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.
In case you want to use a resource as a key in a collection
There's a bunch of class +load methods which uses autoreleased objects. The problem is, as seen here [1], that there's no autorelease pool yet when +load is being called. You need to either:
[1] http://www.mikeash.com/pyblog/friday-qa-2009-05-22-objective-c-class-loading-and-initialization.html
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.