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
Blake Watters
e5093a38dd
Merge pull request #83 from sixten/0.9-error-handling
2011-05-10 17:58:46 -07:00
Jerry Cheung
4ac85a6cb1
add -(void)prepareURLRequest to RKRequest.h to remove build warning
2011-05-08 15:13:21 -07:00
Sixten Otto
40c4940ea6
Minor improvements to error handling behavior
2011-04-28 10:38:08 -07:00
Blake Watters
ff2367d284
Moved query path appending to RKPathAppendQueryParams for convenience. Deprecated RKClient flavor.
2011-04-27 09:05:18 -04:00
Blake Watters
738df05ef5
Initialize file name attachments to an empty string. Fixes #66
2011-04-22 12:08:01 -04:00
Blake Watters
2841d0ba15
Rearrange the notifications to avoid crash during service unavailable condition. fixes #65
2011-04-22 12:06:45 -04:00
Blake Watters
c35d0bab1d
Implemented substantial catalog example application covering advanced usage of RestKit:
...
* Cleaned up remaining warnings about if (self = [super init])
* RKParamsExample - Highlights multi-part uploads
* RKRequestQueueExample - Working with the request queue
* RKBackgroundRequestExample - Examples of using the background policies for backgrounding requests
* RKReachabilityExample - Shows how to work with the reachability observer
* RKRelationshipMappingExample - Shows how to map related objects from JSON into an object graph
* RKCoreDataExample - Shows the basics of using RestKit's Core Data examples
Also rearranged dispatch of RKRequest delegate method for didStartLoad: to ensure requeue callbacks get invoked in a timely manner. refs #62
2011-04-22 11:28:56 -04:00
Blake Watters
71f392acc5
Added note about portions extracted from Apple's Reachability sample
2011-04-19 15:41:56 -04:00
Blake Watters
1437026e43
Fail out build process when run_command encounters non-zero exit status. Fixed OS X compile issues introduced by automatic network activity indicator. refs #57
2011-04-19 13:13:34 -04:00
Blake Watters
381ccadbe2
Added support for spinning the Network activity indicator when busy
2011-04-19 09:59:57 -04:00
Blake Watters
7837e245d9
Implemented support and tests for queue processing delegate methods.
2011-04-19 09:38:25 -04:00
Chad Podoski
f44abbee27
Generalize RKRequestQueue and add NSDecimalNumber type support to RKObjectMapper. refs #50
2011-04-18 17:21:01 -04:00
Blake Watters
695c262d6e
Added Appledoc markup to RKClient
2011-04-14 22:57:42 -04:00