Commit Graph

143 Commits

Author SHA1 Message Date
Blake Watters
d5cc021014 Merging SSL certificate validation support from #131 2011-07-27 08:40:33 -04: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
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
Blake Watters
5a2f937a52 Reworked notifications for consistency with Cocoa idioms. Simplified code paths through the queue. Tweaked the logging for easier info at the Debug level without having to drop down to Trace. 2011-06-29 16:18:18 -04:00
Blake Watters
853704b2fd Rework notifications to allow request queue to observe only the requests it dispatches instead of all of them. Fixes incorrectly decrementing loading count. 2011-06-29 15:36:10 -04:00
Blake Watters
c97af0802b Added new spec for RKURL. Implemented encoding of plus characters. fixes #170 2011-06-29 13:59:40 -04:00
Blake Watters
93d84bc463 Added comments about cache 2011-06-29 13:42:19 -04:00
Blake Watters
2a8ece97c1 Improvements to reachability, the request queue, logging throughout the network layer, decoupling of components via notifications, reliability improvements for unit tests in the cache layer. Improved thread-local cleanup routines inside the managed object store. Changing base URL's is now more reliable. fixes #171, #158, #113, #104, #102 2011-06-29 13:28:14 -04:00
Blake Watters
8fe8e5cc75 Rework queue iteration to use a while loop and maintain a count of dequeued requests to ensure finite iteration. refs #164 2011-06-28 19:20:17 -04:00
Blake Watters
1cfa273224 Added new logging to the RKRequestQueue for inspecting what is happening. Eliminated use of copy during iteration of the request queue to avoid issues with re-entrant invocations of the queue resulting in the queue becoming starved. Fixed a number of flaky tests by making the RKSpec helpers stub out network availability. closes #164 2011-06-28 18:18:49 -04:00
Thom Lawrence
c982cac037 Retrieve parsers using MIME type, not content type. 2011-06-28 15:58:14 +01:00
Blake Watters
5dff3088e2 Added trace logging for Response body 2011-06-24 10:23:54 -04:00
Blake Watters
6f0b0b38f8 Broke out logging for requests into meaningfully differentiated Debug and Trace messages. 2011-06-24 10:13:59 -04:00
Blake Watters
0954d4a063 Fixing more memory leaks 2011-06-20 15:03:35 -04:00
Blake Watters
99ae37037a Fixes for memory leaks with RKParams related to HTTPBodyStream causing a retain 2011-06-20 13:41:42 -04:00
Blake Watters
2006633491 Memory and ivar cleanups for RKParams 2011-06-20 10:49:40 -04:00
Victor Kryukov
9cb4e91ec6 Fix types: _body should be NSMutableData 2011-06-20 10:49:40 -04:00
Victor Kryukov
b14578436b Fix typo in documentation string 2011-06-20 10:49:40 -04:00
Victor Kryukov
5eb654b76a Code cleanup: sent == 0 at that point (found with XCode's Analyzer) 2011-06-20 10:49:39 -04:00
Victor Kryukov
b25d1395ee Code cleanup: background policy is iOS 4.x and higher only 2011-06-20 10:49:39 -04:00
Duncan Lewis
d211d3ba44 Issue #61 patched, adds escapes according to UTF8 encoding 2011-06-16 20:07:19 -04:00
Scott Penrose
87b0ea0b38 Added HTTPBody and HTTPBodyString properties to simplify specifying Request Body. Fixes #55 2011-06-16 19:32:24 -04:00
Scott Penrose
ea4a930cee Add support for 409 and 410 response status codes BOOL helper methods. fixes #115 2011-06-16 18:11:43 -04:00
Jeremy Ellison
9b6581a258 also release the underlying NSURLConnection so we don't leak memory when resetting requests. 2011-06-16 15:19:49 -04:00
Jeremy Ellison
518f57d013 don't leak URLRequest ivar when resetting RKRequest 2011-06-16 14:43:42 -04:00
Jeremy Ellison
9388673d67 Allow RKRequests (and object loaders) to be 'reset' so that you can send them again.
Reset RKObjectLoaders before sending them in RKObjectLoaderTTModel. This fixes reloading of the model (i.e. pull to refresh).
2011-06-16 13:45:14 -04:00
Blake Watters
964ea545ae Added support for HEAD requests. closes #151 2011-06-15 16:14:00 -04:00
Blake Watters
e65ea71b20 Updates to make parsedBody: implementation ready for merge. Migrated all remaining specs to RKSpec so failures don't cause crashes when you use the Hamcrest helpers. closes #153 2011-06-15 10:47:45 -04:00
Leon
550edf9873 Added error to method signature and used RKLogError if the errror isn't nil 2011-06-15 14:51:56 +02:00
Leon
2c5700fded Implemented parsedBody based on the new RKParserRegistry 2011-06-15 13:53:05 +02:00