Commit Graph

69 Commits

Author SHA1 Message Date
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
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
fd9ee9952c Add extern declaration to constants in RKRequestCache. fixes #649, #652 2012-04-11 21:04:00 -04:00
Blake Watters
457a6126cf Refresh copyright notices for all source files 2012-04-04 09:08:54 -04:00
Blake Watters
732b0cd181 Namespace the RKRequestCache constants 2012-04-03 23:39:55 -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
6723502372 Merge branch 'hotfix/545-conditional-nsorderedset' into development 2012-02-25 12:03:48 -05:00
Blake Watters
44ff8826f7 Invalidate timeout timer when POST body data is sent. fixes #535 2012-02-16 11:07:16 -05: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
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
Blake Watters
98cb113abf Invalidate the timer before dispatching error delegate callbacks 2012-01-24 20:45:17 -05: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
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
Brian Morton
8051fbd9ab Invalidate the RKRequest timer in RKResponse when the NSURLConnection begins receiving data. 2012-01-20 09:17:26 -05:00
Brian Morton
15d05f1493 Move the invalidateTimeoutTimer call in RKResponse from didReceiveData to didReceiveResponse and didFailWithError so we are sure its always called and as early as possible. 2012-01-20 09:15:35 -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
Matthias Bartelmeß
e123eaa5fb Updated RKResponse to respect the encoding returned in the Content-Type header (charset=XXX). Exposed
encoding information as methods on RKResponse
2011-12-13 17:03:31 -05:00
Blake Watters
4c8a7f1103 Merge pull request #470 from inquinity/master
Fixed: RKResponse parsedBody will fail when encountering a parsing error if it was called with a nil NSError pointer
2011-12-13 12:12:11 -08:00
Robert Altman
2969e6b9f3 Added missing non-null test for NSError pointer 2011-12-12 17:06:17 -06:00
Blake Watters
479864902b Fixed all build warnings on OS X Framework target 2011-12-08 23:23:20 -05:00
Nolan Waite
9cc6de8dc4 Request delegate can learn of authentication failures 2011-12-08 13:17:52 -07:00
Blake Watters
8a39f93e62 Add support for handling 204 'No Content' responses. fixes #450 2011-12-02 09:27:22 -05:00
Blake Watters
5b718890ac Checking in work in progress on the library reorganization 2011-12-02 09:26:35 -05:00
Michael Fleet
0a0c3ac59e Fixed bug where local requests for bundle resources returned a NSURLResponse instead of a NSHTTPURLResponse, and therefore doesn't respond to statusCode or allHeaderFields. 2011-12-01 11:43:22 -05:00
Blake Watters
e86d9375bd Added test coverage and fixes for cases where the parser returns nil, but no error occurred. fixes #365 2011-09-28 09:43:35 -04:00
Sergej Tatarincev
3983bd00f8 Added download progress 2011-09-28 12:23:28 +03:00
Blake Watters
2d281e60d3 Investigated issues surrounding inability to change HTTP AUTH credentials thoroughly. fixes #250, #237, #127
These issues has been open for some time. I have added thorough unit test coverage
for scenarios of mutating the HTTP AUTH credentials on the RKClient and on individual
RKRequest instances. Everything seems to work fine.

Also added RKAuthenticationExample to RKCatalog for testing. Needs to be updated with
support for using OAuth.
2011-09-27 23:59:06 -04:00
Blake Watters
947cf378c7 Merge pull request #346 from ralfvdz/patch-1
Log the body when all data has been received.
2011-09-21 05:53:07 -07: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
Ralf van der Zanden
41c8d27f04 Log the body when all data has been received. (body not always available/complete in didReceiveResponse) 2011-09-14 14:43:53 +03:00
Blake Watters
2a89404f7d Return nil from needNewBodyStream: to avoid weirdness with connections being revived. refs #335 2011-09-07 21:37:11 -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
d5cc021014 Merging SSL certificate validation support from #131 2011-07-27 08:40:33 -04: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
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
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
Victor Kryukov
9cb4e91ec6 Fix types: _body should be NSMutableData 2011-06-20 10:49:40 -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
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
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
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