Commit Graph

137 Commits

Author SHA1 Message Date
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
Blake Watters
dafe3486e9 Added cache component to logging. Chased down some mystery failing tests. Added thorough logging to RKRequestCache. 2011-06-11 20:27:33 -04:00
Blake Watters
9299cabc11 Implemented flexible logging solution utilizing the excellent LibComponentLogging library. 2011-06-11 20:25:28 -04:00
Blake Watters
f2ceefa012 Merge Request Queue (See issue #75):
* Introduces RKRequestCache for cacheing responses (supports ETag conditional GET, use cache if available, use cache on error, etc.) closes #75
    * Updates to Three20 layer to eliminate need for intermediary TTTableItem classes closes #76
    * Fixes to ensure iOS 3.x compatability:
        * Switched compiler to Clang
        * Updated conditional checks for UIBackgroundTask symbols to ensure runtime safety on iOS 3.x
        * Removed unnecessary linkage against UIKit and CoreFoundation from library targets
    * Fix for issue where RKRequest objects could become stuck in infinite loop within RKRequestQueue loadNextInQueue if you start
      a request and then cancel immediately. On cancel only decrement loadCount if the request has start loading. refs #122
2011-06-11 19:28:44 -04:00
Blake Watters
9416ad9cf6 Added gcov to specs. Added HTTP Basic Authorization optimization 2011-06-11 19:27:18 -04:00
Blake Watters
f3c0995d5e Implementation of Object Mapping 2.0 design:
* Removed RestKit from inheritance hierarchy
  * Mappings are implemented as concrete classes
  * Mapper is much more flexible & powerful
  * Much more robust error handling
  * Serialization is reimplemented as an object mapping operation
  * Added ability to serialize to JSON natively
  * Reworked Core Data integration
  * Simplified the codebase substantially
2011-06-11 19:26:56 -04:00
Scott Penrose
d6bd24a350 RKRequestQueue loadNextInQueue stuck in infinite loop if you start a request and then cancel immediately. On cancel only decrement loadCount if the request has start loading. This needs to be merged into master #122 2011-05-29 00:52:16 -04:00