Commit Graph

38 Commits

Author SHA1 Message Date
Blake Watters
0449380476 Fix deprecation warning in earlier change. Fixed a sequencing problem with the overloaded accessors on RKRequest 2011-01-06 14:51:44 -05:00
Jeremy Ellison
b31e6426a5 Add new RKReachabilityState, RKReachabilityIndeterminate.
Make RKRequestQueue smart, don't start dequeuing requests until reachability state has been determined.
Simplify examples.
2011-01-06 14:12:14 -05:00
Blake Watters
e49d8462a9 Yield to the run loop for a tenth of a second to allow the network reachability observer to be scheduled. This prevents issues where requests dispatched from an app delegate are denied access to the network. 2011-01-03 13:23:14 -05:00
Blake Watters
e7ac2b4577 Merge branch 'master' of github.com:twotoasters/RestKit 2011-01-03 12:52:25 -05:00
Blake Watters
f1db54c156 Introduced RKMakeURL and RKMakeURLPath convenience methods for generating NSURL and NSString URL's quickly against the sharedClient's base URL. This can be useful if you have some web content in your app that loads off of sub-paths and want the convenience & flexibility of working off of resourcePath's instead of full URL's. 2011-01-03 12:49:31 -05:00
Jeremy Ellison
340e587704 Refactor JSONRepresentation to stringFromObject: on RKParser. Fixes https://github.com/twotoasters/RestKit/issues/#issue/6 2011-01-03 12:40:20 -05:00
Jeff Arena
058e55242c replace use of NSString method stringByAddingPercentEscapesUsingEncoding with CFString flavor CFURLCreateStringByReplacingPercentEscapesUsingEncoding, to ensure we do not miss any characters that should be escaped when performing RFC3875 percent escaping 2010-12-30 14:59:30 -08:00
Jeff Arena
716ecb4f26 added RKResponse property exposing the cookies available from the RKResponse headers 2010-12-30 13:29:11 -08:00
Jeff Arena
29f82dff77 fix for bug introduced in commit df05be1cbb8c08fe0dd6; now that we are checking the request method in the params setter, we need to ensure we set the method before setting the params when creating and preparing to send an RKRequest object from RKClient, otherwise we will lose all params for all methods other than GET 2010-12-30 13:28:01 -08:00
Blake Watters
394ebb307f Don't pass a URL into Reachability 2010-12-30 14:28:41 -05:00
Jeremy Ellison
2367ba4293 Make SCNetworkReachability use just the hostname.
Fix examples to check for network connectivity.
2010-12-30 14:22:22 -05:00
Jeff Arena
df62bce0dd add unauthorized convenience method on rkresponse 2010-12-29 17:04:37 -08:00
Blake Watters
7283f19e43 Merge branch 'reachability-queue-three20'
Conflicts:
	Code/Network/RKResponse.m
2010-12-23 14:10:17 -05:00
Blake Watters
df05be1cbb Merge branch 'master' of https://github.com/pashields/RestKit into pashields-master 2010-12-13 17:49:04 -05:00
Jeff Arena
e991ad7033 change RKRequest delegate didfinishload method signature to be a bit cleaner; added code to turn off the reachability observer when the app becomes inactive; changed online/offline state code to support an undetermined state at initial launch, so as to ensure we get all our proper notifications during first run; remove unnecessary debug logging from rkrequestqueue; removed three20 model code that was triggering a forced offline state, which currently does not have a recovery path (e.g. if the app is forced offline, we currently have no built-in mechanism to allow a force back online) 2010-12-08 09:45:26 -08:00
Marc Weil
f3af0feefc Adding authentiction headers to request before sending to stop challenge
responses from being generated server-side on each request. This should
cut down overall request-response cycles by 50% when dealing with
authenticated services.
2010-12-05 12:11:03 -05:00
Jeff Arena
d91223b6fa fixed a crash related to parsing a non-JSON error from a response string; fixed issue with callbacks being fired after a request has been cancelled; fixed leak of resourcePath in RKRequestTTModel; fixed issue with autoreleasepool being drained before background thread objects have been transferred to the callback method; fixed issues with mutating the requestqueue array during enumeration while performing bulk cancels; added additional logging that has been helpful in tracking down many of these crashes (to be removed prior to merge to master) 2010-12-02 19:28:25 -08:00
Jeff Arena
507509fd3e bug fixes for issues related to error conditions that were preventing our request lifecycle from completing correctly 2010-12-02 14:17:58 -08:00
Jeff Arena
c9ba879937 removed duplicate delegates on RKObjectLoader; inverted control for communicating request completion from RKResponse to RKRequest; added state tracking to RKRequest for loaded and loading states; changed queue processing logic to check request states before firing new requests; removed retains of RKObjectLoader from RKRequestTTModel since our queue is handling retains for all asynchronous RKRequest flavors; added separate state tracking to RKRequestTTModel since there are subtle differences between the meaning of loaded/loading in Three20 versus our RKRequest states; removed delegate forwarding code from RKObjectLoader since it is no longer an RKRequestDelegate (which was quite ugly to begin with); removed unnecessary error contructor for RKResponse that was only being used to fire delegate callbacks when an RKRequest failed to fire in offline mode; added TODOs to deep-dive into synchronous request handling 2010-12-02 13:22:38 -08:00
Jeff Arena
6249ece2bc Merge branch 'reachability-queue-three20' of git://github.com/twotoasters/RestKit into reachability-queue-three20
Conflicts:
	Code/Network/RKRequest.m
	RestKit.xcodeproj/project.pbxproj
2010-12-01 21:06:54 -08:00
Blake Watters
a53f28e339 First cut at queue support. 2010-12-01 14:56:16 -05:00
Jeff Arena
39f3d568e2 added reachability support at the manager and client level; added code to short circuit requests if offline; fixed issue with source parameter on loader related to passing managed objects across thread boundaries; added resource path property to the loader 2010-11-30 19:38:27 -08:00
Patrick Shields
785d14cb42 Merge branch 'master' of https://github.com/twotoasters/RestKit 2010-11-23 18:00:58 -05:00
Blake Watters
5a72d0d57d Fix for submission with incorrect MIME Type when only MIME type is provided 2010-11-12 17:28:37 -05:00
Blake Watters
9471aeb3b5 add missing retains 2010-11-12 16:49:42 -05:00
Patrick Shields
bea7ec607c Required for not getting CF 303 errors. Should probably investigate this more, but don't need to use this. 2010-11-07 12:13:46 -05:00
Blake Watters
9c0404e36e Added MIMEType setter flavor for RKParams addData. Typical use case for a data field is to want to set the MIME Type. Added MobileCoreServices.framework to requirements and added to the UISpec target 2010-10-28 13:12:03 -04:00
Blake Watters
8fef65e4df Added optional MIME Type auto-detection using MobileCoreServices 2010-10-27 14:54:37 -04:00
Blake Watters
0d8bc8c92d Added assertion that attached file exists at the path 2010-10-27 13:21:19 -04:00
Blake Watters
0127df862d Added support for tracking upload progress 2010-10-26 14:05:29 -04:00
Blake Watters
f02e48f252 Switched out ContentTypeHTTPHeader for HTTPHeaderValueForContentType so all RKRequestSerializable methods start with an HTTP prefix. Deprecated ContentTypeHTTPHeader. Additional comments to make streaming support straightforward 2010-10-26 13:38:23 -04:00
Blake Watters
6febbe325f Cleaned up naming and removed debugging log statements 2010-10-26 13:12:50 -04:00
Blake Watters
7d3269869b Checking in working version of the streaming uploader. Just need to finish cleaning up the code. 2010-10-26 12:50:48 -04:00
Blake Watters
bd48ae37db Changed globalClient and globalManager to sharedClient and sharedManager to be more in line with Cocoa framework. Marked old methods as deprecated. 2010-10-20 20:29:27 -04:00
Jeff Arena
1a6fdeafd4 introduce RKManagedObjectCache protocol to CoreData component; cleanup remaining NSFetchRequest ivars that are now unused; add RKURL class for making resourcepath and baseurl params available to higher level components; cleanup Three20 library to incorporate latest updates from GateGuru codebase 2010-10-18 16:36:24 -04:00
Jeff Arena
592b2a9e32 initial pass at changing fetchRequest APIs to work with a collection of fetch requests; also performed some API cleanup on RKManagedModel 2010-10-14 19:14:55 -07:00
Blake Watters
f3f09ab35d Rewrote the README to reflect the new realities. 2010-10-01 14:26:21 -04:00
Blake Watters
bd93d43f94 Finished split into more logical components. Library now copies Headers to Build/RestKit and you can selectively link against the components your app needs. libRestKit.a contains everything from the core library. 2010-10-01 13:02:24 -04:00