Commit Graph

118 Commits

Author SHA1 Message Date
Blake Watters
48cb6dfa45 Rename request method <-> string functions to be more idiomatic 2012-08-10 14:04:51 -04:00
Blake Watters
2454d38dcc Add PATCH method 2012-08-09 17:13:13 -04:00
Blake Watters
1463a7d2f8 Cleanup log warnings on OS X related to NSUInteger typedef differences (unsigned int vs unsigned long) 2012-08-07 09:58:30 -04:00
Blake Watters
6af38b8b6d Obtain permanent object ID's for managed objects before sending via RKManagedObjectLoader 2012-07-17 16:26:21 -04:00
Blake Watters
ec6cdd1356 Migrate performSelectorOnMainThread and performSelectorInBackground invocations to GCD 2012-07-11 16:45:08 -04:00
Jawwad Ahmad
82f4630d36 Whitespace syntax cleanup. Refs #614 2012-07-11 10:41:38 -04:00
Blake Watters
5898b95d33 Simplified logic in cocoa-oauth by creating a single method for building NSURLRequests. Update RKRequest to leverage new API 2012-07-04 12:22:07 -04:00
Jawwad Ahmad
abb46c382c Ensure the stars for all pointers belong to the variable rather than the type. Refs #614 2012-06-04 22:47:30 -04:00
Jawwad Ahmad
eaa5484b01 Placing opening braces on a new line for methods to match Apple convention. Refs #614
Used uncrustify's "nl_fdef_brace = add" option to detect issues.
2012-06-04 00:36:19 -04:00
Jawwad Ahmad
6d71b2d82b Add missing space after comma. Refs #614
Used uncrustify's "sp_after_comma = add" option to detect issues.
2012-06-03 23:38:36 -04:00
Jawwad Ahmad
734b0350fe Fix spacing issues identified by uncrustify's "sp_before_sparen = add" option. Refs #614 2012-06-03 23:27:41 -04:00
Jawwad Ahmad
2cf60ffb86 Fix a few spacing issues. Refs #614 2012-06-03 22:51:00 -04:00
Blake Watters
9ca2ba2a3f Clean up inconsistencies with 'cancelled' and 'cancel' to match Cocoa (isCancelled) 2012-05-21 18:11:15 -04:00
Blake Watters
e681b85be4 Eliminate duplication of request method to string logic in [RKRequest HTTPMethod] 2012-05-19 15:50:35 -04:00
Blake Watters
ada95e0281 Migrate RKResponse property from RKObjectLoader to RKRequest. refs #527 2012-05-18 20:05:25 -04:00
Blake Watters
016f13dad0 Convert all tabs to four spaces. refs #743 2012-05-17 18:10:59 -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
Christopher Swasey
6351fd428f Revert those calls to the nonexistent NSURL-originalPath method back to -path 2012-05-10 12:57:31 -04:00
Christopher Swasey
856854a66b Merge in @theorm's additions to RKRequest, and re-vendor cocoa-oauth from our fork with @theorm's additions applied 2012-05-10 12:57:31 -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
Blake Watters
757e01e1f3 Change reachabilityObserver reference to retain for RKRequest 2012-04-09 17:38:49 -04:00
Blake Watters
2723a11294 Reorganized categories under RKAdditions naming convention. Expanded documentation. 2012-04-04 09:08:55 -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
175a90cabe Reorder logging statement so that logging occurs before sending of request to avoid sending message to a zombie instance. fixes #600 2012-03-20 20:43:14 -04:00
Blake Watters
0d709dbc07 Migrate dangling invocations of NSLog -> RKLog. refs #578 2012-03-20 20:43:14 -04:00
Blake Watters
749c6e389f Fix retain cycle causing leak for backgroundPolicy RKRequestBackgroundPolicyContinue. closes #548 2012-03-12 18:50:33 -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
4142ffdb42 Reorganization and cleanups of Unit Tests
* Reorganized tests to accommodate split into Logic & Application.
* Eliminated 'Spec' naming in favor of 'Test' as the suite is entirely based on SenTest.
* Pulled majority of testing support classes up into the library and documented them.
* Introduced RKApplicationTests app for running the RKTableController UI tests
2012-02-10 17:32:23 -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
58102533f1 Fixes an issue where the timeoutTimer wouldn't work for a synchronous request. Fixes #551.
* Removed the timer creation in RKRequest sendSynchronously.
* Pass the timeoutInterval to the NSURLRequest that is responsible for the synchronous request.
* Check if the error returned by NSURLRequest is NSURLErrorTimedOut and return an RKRequestConnectionTimeoutError if necessary.
* Add test for making sure the timeout works properly for a synchronous request.
2012-02-08 20:06:53 -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
b0fd4d4981 Remove duplicate timer creation. Fixes #517. 2012-01-23 10:33:13 -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
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
415ef5a193 Cleaned up all broken specs related to RKObjectPaginator and RKURL changes 2012-01-20 10:21:18 -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
Brian Morton
dab403a9c1 Responsibly invalidate the timeoutTimer when the RKRequest is deallocated. Move location of timer creation for asynchronous request. 2012-01-20 09:17:00 -05:00
Ray Fix
7be7da61cb Fix for ocassional crashes using http basic auth 2012-01-09 20:10:39 -05:00
David Young-Chan Kay
6a18ebd91b RKRequest: Added null check for HTTP Basic username and password. Closes #493. 2012-01-09 20:08:26 -05:00
Blake Watters
af7a7d22b6 Lowered logging level for body from Info to Debug 2011-12-15 13:41:00 -05:00
Blake Watters
479864902b Fixed all build warnings on OS X Framework target 2011-12-08 23:23:20 -05:00