Commit Graph

56 Commits

Author SHA1 Message Date
Blake Watters
5b1c5dae7e Inform the delegate on synchronous requests 2011-03-08 11:36:31 -05:00
Blake Watters
e03c6d3d10 Fixed crash during dealloc of RKClient due to initialization of baseURL observer using a blank host. Updated the object mapper to support class/keypath when loading a single object. Some updates to the UISpec harness to get things working again. 2011-02-25 14:42:50 -05:00
Blake Watters
bf48cf6559 More Xcode 4 crap 2011-02-15 20:25:22 -05:00
Blake Watters
44e424850a Ooops. Use the IP from the hostname rather than the local wireless interface 2011-02-01 19:38:11 -05:00
Blake Watters
bff66e60cc Fixed bug where reachability did not work when initialized with an IP address in the base URL 2011-02-01 19:30:07 -05:00
daniel
20747ffa27 Merge branch 'master' of github.com:twotoasters/RestKit into new-example 2011-01-21 14:54:40 -05:00
Blake Watters
bf1cadc72e Implemented RKMakePathWithObject. Cleaned up some TODO's 2011-01-20 11:24:47 -05:00
Blake Watters
8f863b4c50 Numerous cleanups to the DiscussionBoard example. Need to finish working through cleanups to the authentication process and polish off documentation. Should be ready for merge tomorrow night. 2011-01-18 23:25:19 -05:00
Blake Watters
319f7355af Working on new example 2011-01-16 21:43:21 -05:00
Jeremy Ellison
7177c88182 rename internal didStartLoading method name 2011-01-12 15:27:45 -05:00
Jeremy Ellison
6a5ee2af7e Revert "Remove per-file copyrights"
This reverts commit 91e7c6bb5e.
2011-01-12 15:27:19 -05:00
Jeremy Ellison
91e7c6bb5e Remove per-file copyrights 2011-01-12 15:05:22 -05:00
Jeremy Ellison
634185f48a RKResponse should start loading on didReceiveData: or didSendBodyData, whichever is called first.
This prevents didSendData RKRequestDelegate method from being called before didStartLoading.

Remove goOffline and goOnline support from RKObjectManager. This did not work in the current implementation.
2011-01-12 13:20:26 -05:00
Jeff Arena
d3a1059d68 fix bug with content type accessors in cases where the content type response header is nil 2011-01-10 16:10:30 -08:00
Blake Watters
35ae5c8717 Updated signatures to include RKRequestDelegate protocol 2011-01-10 16:29:58 -05:00
Jeff Arena
c20062cb4e fixed a memory leak associated with the new 503 alert strings on the client 2011-01-06 12:09:42 -08:00
Jeff Arena
13c431d8c4 Merge branch 'master' of git://github.com/twotoasters/RestKit
Conflicts:
	Code/Network/RKRequest.m
	Code/Network/RKRequestQueue.m
2011-01-06 12:00:26 -08:00
Jeff Arena
88489747e8 add additional response convenience method for checking for a 503 response code; quiet a compiler warning regarding depracated client class method; add default support for generating a uialertview when restkit encounters a 503 response; added ability to turn 503 error on/off, as well as ability to customize the alert 2011-01-06 11:55:43 -08:00
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