Commit Graph

170 Commits

Author SHA1 Message Date
Ralf van der Zanden
41c8d27f04 Log the body when all data has been received. (body not always available/complete in didReceiveResponse) 2011-09-14 14:43:53 +03:00
Blake Watters
b946fc3cd9 Small header file changes for Appledoc output changes 2011-09-13 13:13:11 -04:00
Greg Combs
20fb9043b3 Clarified header documentation for RKRequest's cancel method. 2011-09-13 10:53:19 -05:00
Greg Combs
fc5f2b38be Minor cleanup of some whitespace after recent feature pull requests 2011-09-13 01:30:43 -05:00
Greg Combs
6dd1e8da40 Now gracefully handles escaping interpolated resource paths in RKRouter, RKMakePathWithObject, and RKPathMatcher. By adding an encoding handler to SOCKit, we now (by default, but optionally) add percent escapes to each object's property value while it's being interpolated into a resource path pattern, like /stuff/things/:others?apikey=:apikey ... that way it won't brutally mangle the slashes and question marks and ampersands that exist in the resource path pattern, while at the same time properly escaping those same characters when they occur inside the object's property value. Closes #221 2011-09-13 00:50:55 -05:00
Blake Watters
5c359edfc5 Use relative imports for headers in Support module. Removed import of SCNetworkReachability in RKClient 2011-09-08 19:26:33 -04:00
Blake Watters
4226067b8a Use Grand Central Dispatch to fire reachability notifications for IP addresses 2011-09-08 19:22:58 -04:00
Blake Watters
bebc08e34c Remove improper import of RKObjectLoader in RKClient 2011-09-08 19:22:28 -04:00
Blake Watters
6ed37f0eb9 Fix Cocoa 512 errors logged from RKRequestCache. fixes #246
The following changes were made:
* Added isCacheable to RKRequest
* Return nil for cacheKey on non-cacheable RKRequests
* Updated RKRequestCache to ensure attempts to cache uncacheable requests has no effect
* Added basic unit tests and expanded comments on some parts of the cache API
2011-09-07 22:39:57 -04:00
Blake Watters
2a89404f7d Return nil from needNewBodyStream: to avoid weirdness with connections being revived. refs #335 2011-09-07 21:37:11 -04:00
Greg Combs
e38562ffce Introduces RKPathMatcher. This is basically a dressed up front end to jverkoey/SOCKit. Using this will make it very easy to do complex things with patterns, resource paths, and object property interpolation thereof. Whereas RKMakePathWithObject() once took parenthesized parameters like "/stuff/(things)" it now uses colons like "/stuff/:things". It has specs and updated header docs where appropriate. Closes #305. 2011-09-06 15:51:18 -05:00
Blake Watters
4299cab994 Added convenience accessors on RKObjectManager for the requestCache and requestQueue. Cleaned up some styling and normalized method names. 2011-09-06 11:36:50 -04:00
Blake Watters
54007c78d4 Reworked Brendan Ribera's contributions around time zone handling to eliminate the use of transient
NSDateFormatters, added a preferredDateFormatter for use when serializing dates to strings,
replaced the use of the description method for date encoding to strings with invocation of the
preferredDateFormatter, added new attribute transformation strategy from NSDate -> NSString properties
(also using the preferred date formatter), and provided customization support for date handling globally
and on a per-mapping basis. closes #200, closes #313, closes #309, closes #308
2011-09-05 17:25:43 -04:00
Blake Watters
d9d0f7a650 Eliminated the global sharedQueue in favor of allowing each RKClient to own its a private queue. This eliminates problems where multiple clients are tracking reachability notifications and mutating the suspension state on a single queue. If you want to use a single queue across multiple RKClient instances, you can assign a single queue to both and worry about suspension and reachability yourself. fixes #278 2011-09-03 15:52:45 -04:00
Blake Watters
b96940cc64 Eliminated requirement to use -all_load linker flag. Fixed breakage in OS X builds due to ivar/property name disagreement. Removed references to all_load from the install docs. fixes #239 2011-09-01 20:52:46 -04:00
Blake Watters
f0768cc03c Fix memory leak of hostname attribute in reachability observer. fixes #268 2011-08-27 21:13:24 -04:00
Blake Watters
218555b195 Do not add headers for params if the request is a GET or a HEAD. refs #303 2011-08-27 19:10:48 -04:00
Blake Watters
0640f20bd2 Added newRequestQueueWithName to the API 2011-08-18 13:00:51 -04:00
Blake Watters
84032d9aa6 De-emphasized the use of the sharedQueue and improved management of queue suspension state when changing out the baseURL on RKClient. This should prevent the queue from becoming suspended beyond the life of an RKClient that suspended it. Queues are now also properties on a per-client and per-request basis, so it is easier to segregated parts of your app into different queues. The relationship between RKRequest and RKRequestQueue should be decoupled at some point. 2011-08-18 11:48:37 -04:00
Blake Watters
be46e3b0f2 Merge branch 'master' of https://github.com/cammm/RestKit into cammm-master 2011-08-16 22:21:07 -04:00
Victor Kryukov
e5dd917209 Fix #180 - Network Activity Indicator Gets Clobbered by Multiple Queues 2011-08-12 12:55:55 -07:00
Blake Watters
9420af3276 Remove observer in dealloc 2011-08-10 20:29:58 -04:00
Cameron Royal
27fc1dbb5e Merged latest from upstream 2011-08-04 14:54:32 +08:00
Blake Watters
946c558675 Updated appledoc binary and templates. Fixed ampersands in some comments that were blocking Docset generation. Updated Appledoc rake tasks to reflect the exit statuses emitted by appledoc. Pushed 0.9.3 appledoc to restkit.org 2011-08-02 08:42:59 -04:00
Cameron Royal
d24c6d5180 Merge branch 'master' of git://github.com/RestKit/RestKit 2011-07-29 11:41:37 +08:00
Blake Watters
d5cc021014 Merging SSL certificate validation support from #131 2011-07-27 08:40:33 -04:00
Cameron Royal
1a4191be11 Merge branch 'master' of git://github.com/RestKit/RestKit 2011-07-27 10:11:29 +08:00
Blake Watters
7c6507cacf Update the mutable URL request when switching out the URL or resourcePath 2011-07-24 19:15:45 -04:00
Blake Watters
406c5a1f7c Added support for mutating URL and resourcePath on RKRequest and RKObjectLoader. closes #242 2011-07-24 16:51:19 -04:00
Blake Watters
d12568580d Merge pull request #234 from GateGuru/unit-testing-and-queue-fixes
Unit testing and queue fixes
2011-07-22 05:15:01 -07:00
Cameron Royal
9990f3ee51 First attempt at recursive implementation of URLEncodedString 2011-07-22 17:09:42 +08:00
Blake Watters
b778af11d7 Fix for issue where authentication challenges without credentials would cause stream errors when coupled with an RKParams (NSInputStream) based params payload 2011-07-21 21:47:02 -04:00
Blake Watters
7246afc998 Fixes to enable RestKit Core Data to be easily unit tested from a Unit Testing bundle. Improved thread safety in the request queue and fixed an issue where requests dispatched from background threads would not get callback methods due to thread termination. The request queue now guarantees requests are sent from the main thread. 2011-07-21 11:33:17 -04:00
Blake Watters
ae29401841 Added specs for zero-length Content-Length header when params is nil or empty 2011-07-20 22:56:22 -04:00
Victor Kryukov
a40dcba0f9 Preserve trailing slash in resource path 2011-07-16 18:39:44 +04:00
Blake Watters
6de429051b Merge pull request 196
commit 802d47753c067c6e84463e7aee7bae5454c9520b
Author: Cédric Luthi <cedric.luthi@gmail.com>
Date:   Thu Jul 7 02:56:09 2011 +0200

    Use stringByAppendingPathComponent: for concatenating paths
2011-07-06 22:09:01 -04:00
Blake Watters
c7d8d0db3b Fix and test coverage for base URLs containing a path 2011-07-06 15:57:05 -04:00
Blake Watters
6376274900 Fixes for URL encoding of paramters in GET request. closes #193 2011-07-06 15:27:40 -04:00
Blake Watters
2b8379cac3 Fix for missing prototype warnings due to not including void in the parameters list for C functions that take no arguments. 2011-07-06 10:10:21 -04:00
Blake Watters
348e86cbc8 Fix for inappropriate suspension of the main queue when using an IP address instead of a hostname. 2011-07-05 16:23:38 -04:00
Blake Watters
546eb627cd Respect the root keyPath when constructing a temporary object mapping provider. Covers the case where an object mapping targeting nested content is being directly specified. 2011-07-02 11:04:56 -04:00
Blake Watters
aa6102f022 Cleaning up analyzer warnings in the cache 2011-07-01 10:00:18 -04:00
Blake Watters
72f26690ed Fixing crash from over-release of RKParams. 2011-06-30 17:19:12 -04:00
Blake Watters
1c7f90c6ad Added build conditional to ensure RestKit builds for OS X 2011-06-30 13:59:30 -04:00
Jeremy Ellison
ce445a284e fix indentation 2011-06-30 12:54:03 -04:00
Jeremy Ellison
8ce9bb83a5 Fix crash when trying to call HTTPBody on params objects that do no respond to it.
Solution is to not cache _params objects using HTTPBodyStreams in stead of HTTPBody.
2011-06-30 12:54:03 -04:00
Jeremy Ellison
eea75bdb3c Allow Timeout caching and ETag caching to play nice with each other. Update the internal cache date when we get a 304 back. 2011-06-30 12:54:03 -04:00
Jeremy Ellison
f98566b837 Implement Timeout Based Caches 2011-06-30 12:54:02 -04:00
Blake Watters
2ac45f5ccc Refactored object loaders to provide easier support for non-nested JSON responses. There are new flavors of getObject:, postObject:, etc.
that allow the developer to explicitly specify the object mapping to use for processing the response. closes #168
2011-06-30 10:33:39 -04:00
Blake Watters
2e7adbdc1e Restore the managed object cache functionality and add test coverage so it does not break again. fixes #167 2011-06-29 22:08:35 -04:00