Commit graph

451 commits

Author SHA1 Message Date
Peter Steinberger
28e580c961 Replaces a failure block with dispatchFailureBlock method
I missed that on the initial transform.
2012-02-08 15:05:19 -08:00
Peter Steinberger
800d05181d Simplify dispatchFailureBlock
As error is overridden to always return the custom error object we can
omit the extra error: parameter in dispatchFailureBlock, making the
code even simpler.
2012-02-08 15:04:29 -08:00
Peter Steinberger
30a5cea4fc Added methods to simplify calling the success/failure handlers. 2012-02-06 13:43:43 -08:00
Peter Steinberger
feaf0814c4 add support for setting custom success/failure callback queues. Defaults to main queue if nothing set. 2012-02-06 13:29:00 -08:00
Mattt Thompson
4266dc60d1 Adding notifications for network reachability changes to AFHTTPClient 2012-02-01 11:27:57 -08:00
C. Bess
fe56222f5c Updated reachability flags. 2012-01-28 14:13:52 -06:00
C. Bess
3e4725bb3e Improved reachability check, detects severed internet connections. 2012-01-28 13:59:40 -06:00
Mattt Thompson
dfa6e97ad3 Merge branch 'feature-batched-operations' into experimental-0.9
Conflicts:
	AFNetworking/AFHTTPClient.m
2012-01-23 08:44:59 -08:00
Mattt Thompson
e334407891 Adding -description to AFHTTPClient 2012-01-23 08:41:55 -08:00
Mattt Thompson
21e907cb98 Adding -description to AFURLConnectionOperation 2012-01-23 08:35:43 -08:00
Mattt Thompson
a9094d38f4 Merge branch 'afjson' of https://github.com/jparise/AFNetworking into jparise-afjson 2012-01-22 11:46:22 -08:00
Jon Parise
3095740490 Improve NSIndexSet formatting in error strings.
This introduces an AFStringFromIndexSet() utility function that
formats an NSIndexSet (e.g. self.acceptableStatusCodes) as a nicer,
more consumable string than what [NSIndexSet description] provides.
2012-01-20 14:58:48 -08:00
Jon Parise
6c70e39584 Mark the AFJSON* functions as 'extern'. 2012-01-20 14:35:19 -08:00
Jon Parise
776b251f03 Move the AFJSON* functions into a source file.
Previously, these functions were marked 'static' and were being
included by multiple other source files. That wasn't ideal because it
resulted in their implementations being duplicated in multiple link
units.

Worse is the fact that the previous organization generated fatal
compilation errors about unused symbols when strict settings are
enabled.
2012-01-20 11:56:55 -08:00
Mattt Thompson
b782991065 Adding check for responseData having non-zero length for response object methods in AFHTTPRequestOperation subclasses 2012-01-20 11:03:08 -08:00
Mattt Thompson
eabde28fd6 Minor refactoring to AFHTTPRequestOperation 2012-01-20 10:42:38 -08:00
Jon Parise
8559968514 Conditionally define the _af_nsjson_* labels.
These are only used when _AFNETWORKING_PREFER_NSJSONSERIALIZATION_ is
defined.  Otherwise, they generate unused symbol warnings under strict
compilation settings.
2012-01-19 17:58:24 -08:00
Mattt Thompson
0c25bcee82 Merge branch 'experimental-reachability' into experimental-0.9
Conflicts:
	AFNetworking/AFHTTPClient.m
2012-01-19 17:29:44 -08:00
Mattt Thompson
1ab2eed8c8 Adding #ifdef macros to conditionally compile reachability features only when the SystemConfiguration is available 2012-01-19 17:26:12 -08:00
Jon Parise
2fc6d999b5 xml_request_operation_processing_queue() is Mac-only.
Wrap xml_request_operation_processing_queue() in a test for
__MAC_OS_X_VERSION_MIN_REQUIRED because it is only used by a
Mac-specific code block down below.

This addresses an unused symbol warning when compiling with strict
settings.
2012-01-19 17:25:29 -08:00
Mattt Thompson
df21de7e63 Merge branch 'experimental-thread-safe' into experimental-0.9
Conflicts:
	AFNetworking/AFURLConnectionOperation.m
2012-01-19 16:55:00 -08:00
Mattt Thompson
735d86a79b [Issue #161] [Issue #167] Replacing AFHTTPClient -cancelHTTPOperationsWithMethod:andURL: with -cancelAllHTTPOperationsWithMethod:path 2012-01-19 16:42:12 -08:00
Mattt Thompson
3ff5aafab7 Removing AFImageCache from public API, embedding it instead in UIImageView+AFNetworking implementation 2012-01-19 11:58:17 -08:00
Mattt Thompson
71bb48fd16 Adding documentation for array formatting behavior for AFQueryStringFromParametersWithEncoding
Minor refactoring
2012-01-18 17:57:26 -08:00
Mattt Thompson
7d656c2cbe Merge branch 'BNT_FormatQueryArrayParams' of https://github.com/BraveNewTalent/AFNetworking into BraveNewTalent-BNT_FormatQueryArrayParams 2012-01-18 17:36:37 -08:00
Mattt Thompson
aaa5858546 Adding shortcircuit for _AFNETWORKING_PREFER_NSJSONSERIALIZATION_ 2012-01-18 17:23:45 -08:00
Mattt Thompson
54194a3cb6 [Issue #138] Adding double CRLF to multipart form final boundary
Minor refactoring of AFHTTPClient
2012-01-18 16:51:58 -08:00
Mattt Thompson
eb20980e86 Removing exception caused by multipartFormRequestWithMethod:path:parameters:constructingBodyWithBlock: is called with certain HTTP methods. Although message bodies for methods like HEAD, GET, and DELETE are traditionally ignored, there is nothing in the HTTP or multipart specs that explicitly forbid the use of multipart for a particular HTTP method. 2012-01-18 15:53:53 -08:00
Mattt Thompson
635b809020 Renaming 'class' variable to fix errors during compilation caused by some build settings (Thanks, Charlie Williams) 2012-01-18 15:31:09 -08:00
Charlie Williams
8688e7e505 Explicit cast in line 378 to uint8_t* needed for some build configs (i.e. mine) to avoid error. 2012-01-18 15:27:30 -08:00
Mattt Thompson
8c2304cdfe [Issue #158] [Issue #163] Fixing error check in appendPartWithFileURL:name:error:. Looking at the documentation for NSURLConnection +sendSynchronousRequest:returningResponse:error:, we don't really need to check error to do the right thing. Therefore, we can get away with checking data and response, and leaving the inclusion of the specified **error as an optional exercise to the user 2012-01-16 14:32:44 -08:00
Mattt Thompson
d6d97c7106 Adding missing raise for exception in AFJSONDecode 2012-01-16 14:21:32 -08:00
Mattt Thompson
ae48276092 [Issue #173] Fix data length issues in AFBase64EncodedStringFromString 2012-01-16 11:49:30 -08:00
Mattt Thompson
d1b5e285ca Minor refactoring of XMLDocumentRequestOperationWithRequest:success:failure: 2012-01-10 14:56:55 -08:00
Mattt Thompson
8efa2737e7 Merge branch 'experimental-authentication-challenge' 2012-01-10 14:40:25 -08:00
Jorge Bernal
728f5c3d75 Cancel request if there is an authentication challenge but no credentials for it
Conflicts:

	AFNetworking/AFURLConnectionOperation.m
2012-01-10 14:40:15 -08:00
Mattt Thompson
bdab46889b Use nested if/else instead of early return in -connection:didReceiveAuthenticationChallenge: 2012-01-10 13:41:36 -08:00
Mattt Thompson
52559ccec3 Adding documentation to -setReachabilityStatusChangeBlock: 2012-01-10 13:35:41 -08:00
Mattt Thompson
c713179420 Replacing AFNetworkReachabilityStatus type with BOOL 2012-01-10 13:17:27 -08:00
Mattt Thompson
95442be7b3 Initial implementation of network reachability callbacks 2012-01-10 12:20:30 -08:00
Mattt Thompson
2c4a643d7d Merge pull request #164 from mgp/master
Fix up documentation for requestWithMethod:path:parameters:.
2012-01-09 17:13:01 -08:00
Michael Parker
2183dbbbcc "Content-disposition" should be "form-data" for a single file.
The "Content-disposition" should only be "file" if one of multiple files in a subpart. See the end of http://www.w3.org/TR/html4/interact/forms.html, section 17.13.4, for details. AFNetworking does not currently support creation of subparts where "file" should be used.

This fixes Tornado from failing to parse our file upload.
2012-01-06 21:24:45 -08:00
Michael Parker
87b852700a Fix up documentation for requestWithMethod:path:parameters:.
It is not responsible for finding the registered subclass that can handle a request; instead, it simply builds the request. HTTPRequestOperationWithRequest:success:failure: is responsible for this.
2012-01-05 20:47:59 -08:00
Mattt Thompson
2f2ee796ed Initial implementation of batched request operations 2011-12-17 23:49:51 -06:00
James Frye
44f042512c Fixing SBJSON encoding 2011-12-16 16:38:13 -05:00
Mattt Thompson
bb7b48e14e Adding section about execution time and memory constraints of multipart form data construction 2011-12-13 09:55:37 -06:00
Mattt Thompson
a5b33d573a Minor code formatting 2011-12-13 09:39:31 -06:00
Mattt Thompson
6d15ca8807 Merge branch 'master' of https://github.com/MarrLiss/AFNetworking into MarrLiss-master 2011-12-13 09:38:31 -06:00
Jake Boxer
b3244d8e57 Make JSON requests allow text/javascript content 2011-12-11 01:10:01 -08:00
Štěpán Petrů
4c5bdbd7de Added scaling while constructing image from cached data. 2011-12-10 19:00:49 +01:00