Commit Graph

67 Commits

Author SHA1 Message Date
Blake Watters
4105625776 Replace v0.9.4 references with 0.10.0 2012-05-18 18:05:41 -04:00
Blake Watters
fcb973056b Cleanup trailing whitespace. refs #743 2012-05-17 18:00:16 -04:00
Blake Watters
938304d542 Fixes to ensure failed requests are not resent. refs #628, fixes #744, closes #720
Additional changes and test coverage to handle the case of loading an invalid URL
or otherwise immediately encountering an error condition:

* Restores use of removeLoadingRequest: within the queue
* Updates fragile tests to ensure better coverage for error cases
* Sets isLoaded to YES during error callbacks to prevent duplicated dispatching
2012-05-16 23:50:43 -04:00
Blake Watters
4071fa9a32 Integrated support for configuring runLoopMode on a per request basis. closes #560 2012-04-17 21:28:48 -04:00
Marcus Brito
ea100b6aac Add a RKRequest attribute to control redirect handling
The default behavior is the same as before, to follow redirects. If RKRequest.followRedirect is set to NO, then a redirect (301, 302, 307) response will not be followed, and the request processing will proceed using the current request only.
2012-04-17 21:16:32 -04:00
Sylvain Guillopé
46f668d7e9 Added support for connection:didReceiveResponse: to be forwarded from RKResponse through RKRequestDelegate 2012-04-17 20:57:52 -04:00
Blake Watters
757e01e1f3 Change reachabilityObserver reference to retain for RKRequest 2012-04-09 17:38:49 -04:00
Blake Watters
457a6126cf Refresh copyright notices for all source files 2012-04-04 09:08:54 -04:00
Blake Watters
0771b3e9b3 Added macro for ignoring delegate messages sent after an RKRequest has been cancelled.
Fixes intermittent crash in the test suite due to authentication challenge callbacks being
processed after the request is through. fixes #639
2012-04-03 23:39:55 -04:00
Blake Watters
0448090504 Disabled invalid caching behavior for PUT & POST responses. fixes #589 2012-03-12 18:33:35 -04:00
Rui D Lopes
693d839364 Adding the ability to set a default content decoding other than NSUTF8StringEncoding whenever HTTP headers do not contain any information. closes #547 2012-02-15 14:28:03 -05:00
Blake Watters
948cc85873 Added new pre-flight delegate callbacks for customization of RKRequest and RKObjectLoader instances before dispatch 2012-02-15 12:06:24 -05:00
Blake Watters
9d9dac257b Added documentation for wasSentToResourcePath:method: 2012-02-13 13:25:28 -05:00
Blake Watters
a5cb5f5060 Implemented helper functions for converting between Strings and RKRequestMethod enum types. 2012-02-10 16:30:58 -05:00
Blake Watters
3d0f0ab39e Introduced the RKTableController component for iOS.
RKTableController provides a flexible, integrated system for driving iOS table views using
the RestKit object mapping engine. Local domain objects can be mapped into table cells within a
collection or presented for editing as part of a form. There are three flavors of table controllers
available:

* Static Tables: RKTableController can be used to render simple static tables that are composed of RKTableItems
presented in RKTableSections. Table items can quickly be built and added to a table without a backing model
or can have content object mapped into them for presentation.
* Network Tables: RKTableController can also render a table with the results of a network load. The typical use
case here is to have RestKit retrieve a JSON/XML payload from your remote system and then render the content into
a table.
* Core Data Tables: RKFetchedResultsTableController can efficiently drive a table view using objects pulled from a
Core Data managed object context. Typical use-cases here are for the presentation of large collections that are
pulled from a remote system, offering offline access, or speeding up a UI by using Core Data as a fast local cache.

RKTableController supports a number of bells and whistles including integrated searching/filtering and pull to refresh.
2012-02-10 16:30:54 -05:00
Brian Morton
55dd517e2c Clean up documentation and organization in RKRequest header.
* Add/change appledoc section headers to be consistent.
* Reorganize methods and properties to fit under their respective sections.
* Fix documentation whitespace to be consistent.
* Fill in missing documentation, parameter definitions, and return values.
* Fix documentation formatting, styling, and placement.
* Clean up asterisk placements in variable declarations.
* Fix indentation whitespace.
2012-02-09 01:31:35 -08:00
Blake Watters
a719843c91 Drop the client prefix from the SSL validation properties added to RKRequest 2012-01-24 11:47:31 -05:00
Christopher Swasey
7ea39690c5 Decouple RKResponse from sharedClient Fixes #430 2012-01-23 18:21:22 -05:00
Brian Morton
7c84d89bdf Move RKRequest timeoutTimer creation to a helper method so that we can test the number of times it is invoked. 2012-01-23 10:33:07 -05:00
Jeff Arena
c0cd23a14d Add setBody:forMIMEType: method to RKRequest. Fixes #227. 2012-01-20 14:09:25 -05:00
Jeff Arena
53ce2260bd Fixes #428, related to a misspelling in the request:didReceiveData:totalBytesReceived:totalBytesExpectedToReceive: 2012-01-20 12:13:40 -05:00
Jeff Arena
6e80ae62ae Fix for #486 2012-01-20 11:45:04 -05:00
Blake Watters
5a92a661a8 Fix spelling errors for Cacheing -> Caching 2012-01-20 10:21:56 -05:00
Blake Watters
1d27f7bbbe Refactored object manager API's to de-emphasize delegates and removal duplication of blocks and delegates. Added block callbacks to RKObjectLoader. 2012-01-20 10:21:56 -05:00
Blake Watters
412b0f9756 Work in progress on cleanup 2012-01-20 10:21:18 -05:00
Brian Morton
90716335f5 Add support for timing out an RKRequest via a timeoutTimer and a timeout property.
* Add timeoutInterval property on RKRequest with a default value of 120.0
* Add timeout method that is called by the timer when the timeout interval has been exceeded to cancel the request and return an error via didFailLoadWithError:
* Add invalidateTimeoutTimer method that is called by RKResponse when the NSURLConnection begins receiving data.
* Add call to invalidateTimeoutTimer in RKRequest cancelAndInformDelegate: so we don't have a dangling timer.
* Add timer creation to sendAsynchronously and sendSynchronously
2012-01-20 09:19:45 -05:00
Blake Watters
89a4e579fd Revert "Merge branch 'nolanw-request-delegate-gets-failed-auth-challenge'"
This reverts commit d6510d963f, reversing
changes made to a1e2061106.
2012-01-09 19:53:23 -05:00
Blake Watters
e5e05a0563 Added delegate callback when authentication challenge fails. closes #462 2011-12-13 21:16:30 -05:00
Nolan Waite
9cc6de8dc4 Request delegate can learn of authentication failures 2011-12-08 13:17:52 -07:00
Blake Watters
d75fd7d0b0 Refactored RKReachabilityObserver to work around issues with iOS 5 + host reachability and expand its capabilities. closes #408
* Added support for monitoring by IP address or hostname as well as local Wifi and Internet access generally
* Eliminated usage of synchronous calls to obtain reachability flags during status checks
* Reworked SystemConfiguration reachability callback to cache flags
* RKClient now monitors Internet access instead of hostname based reachability by default. baseURLReachabilityObserver eliminated in favor of reachabilityObserver. It is now a retain property that can be customized
* Queue suspension is now tied to the reachability observer rather than baseURL mutation
2011-10-19 08:51:37 -04:00
Sergej Tatarincev
3983bd00f8 Added download progress 2011-09-28 12:23:28 +03:00
Blake Watters
eb887e38c6 Refactored OAuth support for merge into master. fixes #84, #211
Cleaned up @rodchile's excellent work integration OAuth 1.0 and 2.0 into RestKit. Changes
are as follows:

* Introduced new RKRequestAuthenticationType to replace the forceBasicAuthentication and other
    methods for influencing how authorization works.
* Moved TDOAuth code into Vendor/
* Renamed authorization code flow classes and delegate methods for clarity.
2011-09-20 15:52:17 -04:00
Greg Combs
62d7042ebc Merge pull request #334 from parkerboundy/add-apache-license
Add the Apache License to headers (Issue #145) Closes #145.  Thanks @parkerboundy.
2011-09-14 21:56:15 -07: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
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
Parker
e8b24a3959 added apache license to everything in the Network directory
I got tired of doing individual commits for each file, so I just did the
rest of the directory.
2011-09-07 10:45:42 -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
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
406c5a1f7c Added support for mutating URL and resourcePath on RKRequest and RKObjectLoader. closes #242 2011-07-24 16:51:19 -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
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
Victor Kryukov
b25d1395ee Code cleanup: background policy is iOS 4.x and higher only 2011-06-20 10:49:39 -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
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
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