Peter Steinberger
fefd1a77ff
don't use __weak for completionBlocks. (Issue #414 )
...
We nil out the completionBlock manually in AFURLConnectionOperation. Using __weak here potentially doesn't call the set completion blocks.
Restores iOS4 compatibility. Also shortens inline ifs with a ternary conditional(?:).
2012-07-16 19:21:30 +02:00
Mattt Thompson
ae340b19e9
Removing whitespace leftover in dealloc from migration
2012-07-03 07:20:15 -07:00
Mattt Thompson
7fda89e4a2
[Issue #379 ] Fixing AFHTTPRequestOperation +canProcessRequest:
2012-06-28 15:51:55 -07:00
Mattt Thompson
2b2317907e
[Issue #379 ] Fixing AFHTTPRequestOperation +canProcessRequest:
2012-06-28 15:51:27 -07:00
Mattt Thompson
ea94ea6ffa
Revert 25620fe839
2012-06-26 09:34:08 -07:00
Mattt Thompson
f1b3101a63
First pass at converting to ARC
2012-06-26 09:14:52 -07:00
Steven Fisher
021fe2b463
Update AFNetworking/AFHTTPRequestOperation.m
2012-05-02 10:13:03 -07:00
Mattt Thompson
3ee1fefeac
Minor formatting
2012-04-30 10:49:00 -07:00
Zachary Waldowski
25620fe839
Restore iOS 4.0 compatibility.
...
Signed-off-by: Zachary Waldowski <zwaldowski@gmail.com>
2012-04-28 18:00:28 -04:00
Tom Wanielista
02c849bdc8
Fix an issue where the skipped character set points to bad memory.
2012-04-27 11:45:47 -07:00
Mattt Thompson
ac67d7e918
Merge branch 'steipete-pause-resume' into experimental-pause-resume
2012-04-24 20:28:08 -07:00
Mattt Thompson
701a60a10f
Merge branch 'master' into experimental-pause-resume
...
Conflicts:
AFNetworking/AFHTTPRequestOperation.h
AFNetworking/AFHTTPRequestOperation.m
2012-04-24 20:27:37 -07:00
Mattt Thompson
bbacf3d7c6
Removing unnecessary initialization of completionBlock in init
2012-04-24 20:06:47 -07:00
Mattt Thompson
8a93284ca4
Ah, the wonderful feeling of deleting significant chunks of code
2012-04-23 21:14:27 -07:00
Mattt Thompson
3124db42cd
Stashing first attempt to simplify dispatching
2012-04-23 20:58:14 -07:00
Mattt Thompson
4a354fda24
Merge pull request #294 from kirsplatrick/callbackQueue-fix
...
Fixed crash in special case for custom callback queues
2012-04-23 20:22:19 -07:00
Patrick Hernandez
3263f06edb
Fixed a leak of AFHTTPRequestOperation in setCompletionBlock:
...
- Added a block object to reference self in the completion block
- Added a pointer to the onceToken to be used in the completion block
2012-04-14 15:16:14 -05:00
Mattt Thompson
9a07a953a7
Fixing pragma mark label
2012-04-13 08:37:04 -07:00
Patrick Hernandez
1e78a5b2f9
Fixed crash in special case for custom callback queues
...
- Added a line for setting _successCallbackQueue to NULL when releasing the call back queue in the setter
- Added a line for setting _failureCallbackQueue to NULL when releasing the call back queue in the setter
2012-04-11 18:37:53 -05:00
Peter Steinberger
61eda7c4e0
adds function to responseFilePath (streaming into a file, if set)
...
adds total/offsetContentLength. We really need those in case we pause/resume.
2012-04-09 17:45:41 -07:00
Peter Steinberger
24564772df
create and set temporary path
2012-04-09 13:58:36 -07:00
Patrick Hernandez
8b94ef8e44
Optimized how enqueueing operations works
...
- Removed the NSBlockOperation as it was not longer needed for completion block to be fired appropriately
- Added a safety call to setCompletionBlock in AFHTTPRequestOperation to ensure that dispatch_group_leave would be called
2012-04-09 00:19:28 -05:00
Patrick Hernandez
57da89896c
Update to support batch completion block firing after all dependent completion blocks.
...
- Added dispatch group property to AFHTTPRequestOperation
- Modified all request objects to call dispatch_group_async in completion blocks
- Added a dispatch semaphore for thread safety of the dispatch group property
- Added dispatch_group_enter and dispatch_group_leave calls to ensure requests are always in the group until the completion block finishes.
- Added an override for setCompletionBlock to call dispatch_group_leave so that subclasses do not need the call in each completion block.
- Modified enqueueBatchOfHTTPRequestOperations to now dispatch_group_notify in the NSBlockOperation completion block
2012-04-08 22:31:35 -05:00
Mattt Thompson
2a1d81a792
Cleaning up experimental bits
...
Re-creating AFDownloadRequestOperation, now with an API closer to NSURLDownload
2012-03-27 12:05:00 -07:00
Mattt Thompson
ca697ce300
Settling on a relatively stable implementation of pause/resume
2012-03-27 11:01:20 -07:00
Mattt Thompson
e37a6af943
Merge branch 'experimental-1.0RC1' into experimental-resumeable-streaming-downloads
...
Conflicts:
AFNetworking/AFHTTPRequestOperation.h
AFNetworking/AFHTTPRequestOperation.m
2012-03-26 11:31:11 -07:00
Mattt Thompson
c40983e56f
Adding -temporaryPath property to AFHTTPRequestOperation
2012-03-26 11:29:31 -07:00
Mattt Thompson
331d7bcbf2
Moving resumeable streaming download functionality to AFHTTPRequestOperation
2012-03-25 12:23:40 -07:00
Mattt Thompson
fe0f1ce932
-cStringUsingEncoding:NSUTF8Encoding -> -UTF8String
2012-03-12 20:22:46 -07:00
Mattt Thompson
d5d44f681e
Merge branch 'experimental-overrideable-http-operation-validation' into experimental-1.0RC1
2012-03-09 16:05:29 -08:00
Mattt Thompson
2b6e44cf1d
[Issue #238 ] Reverting change in AFHTTPRequestOperation -setCompletionBlockWithSuccess:failure: to once again have responseData be the response object
2012-03-09 12:44:29 -08:00
Mattt Thompson
8bfee9e910
Refactoring +canProcessRequest: and content type acceptability
2012-03-03 13:19:53 -08:00
Mattt Thompson
68eb634027
Adding AFContentTypesFromHTTPHeader()
2012-03-02 11:18:20 -08:00
Mattt Thompson
5b7a2cb05f
Using class method swizzling to dynamically modify class method values for acceptable status codes and content types
2012-03-02 10:42:24 -08:00
Mattt Thompson
1171a75b84
Merge pull request #186 from jparise/indexset-string
...
Improve NSIndexSet formatting in error strings.
2012-02-29 18:16:20 -08:00
Mattt Thompson
b723e5b75c
Removing AFInternal category, opting instead to inline success and failure dispatch
...
Minor refactoring and reformatting of AFHTTPRequest subclasses
Changing AFXMLRequestOperation error to XMLError to match rest of subclasses
2012-02-20 20:22:46 -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
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
Mattt Thompson
eabde28fd6
Minor refactoring to AFHTTPRequestOperation
2012-01-20 10:42:38 -08:00
Mattt Thompson
200512c7b3
Merge branch 'experimental-http-client-callback-refactoring' into experimental-0.8
2011-11-07 11:20:15 -06:00
Dustin Barker
c5190878a9
Check only content length, ignore status code.
...
Per discussion here: https://github.com/gowalla/AFNetworking/pull/88#issuecomment-2486149 .
2011-10-25 10:08:02 -07:00
Mattt Thompson
a37cda1032
Follow overriding pattern for error as used in HTTP operation subclasses
2011-10-24 13:32:42 -05:00
Mattt Thompson
30ea7353d4
Refactoring success and failure callbacks for HTTP request operations and client, to add more information and make everything more consistent
...
Removing AFHTTPClient protocol
2011-10-24 13:08:58 -05:00
Mattt Thompson
8007f0aade
Fixing default implementation of AFHTTPRequestOperation +HTTPRequestOperationWithRequest:success:failure: not return nil
2011-10-24 09:48:19 -05:00
Mattt Thompson
25ea84a891
Changing -hasContent to readonly @property
...
Changing conditions of not having property to be either length == 0 or status code == 204
2011-10-21 13:56:31 -05:00
dstnbrkr
71a7a06649
Only check content type when response has content.
2011-10-21 10:59:59 -07:00
Mattt Thompson
e85756ff4c
Merge branch 'ignore-content-type' of https://github.com/dstnbrkr/AFNetworking into dstnbrkr-ignore-content-type
...
Conflicts:
AFNetworking/AFHTTPRequestOperation.m
2011-10-21 11:09:15 -05:00
dstnbrkr
256704ee96
Ignore content type if content has zero length.
2011-10-20 11:22:33 -07:00