Changing -hasContent to readonly @property
Changing conditions of not having property to be either length == 0 or status code == 204
This commit is contained in:
parent
71a7a06649
commit
25ea84a891
1 changed files with 2 additions and 2 deletions
|
|
@ -23,8 +23,8 @@
|
||||||
#import "AFHTTPRequestOperation.h"
|
#import "AFHTTPRequestOperation.h"
|
||||||
|
|
||||||
@interface AFHTTPRequestOperation ()
|
@interface AFHTTPRequestOperation ()
|
||||||
- (BOOL)hasContent;
|
|
||||||
@property (readwrite, nonatomic, retain) NSError *error;
|
@property (readwrite, nonatomic, retain) NSError *error;
|
||||||
|
@property (readonly, nonatomic, assign) BOOL hasContent;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation AFHTTPRequestOperation
|
@implementation AFHTTPRequestOperation
|
||||||
|
|
@ -75,7 +75,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)hasContent {
|
- (BOOL)hasContent {
|
||||||
return [self.responseData length] > 0 && [self.response statusCode] != 204;
|
return [self.responseData length] > 0 || [self.response statusCode] != 204;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)hasAcceptableStatusCode {
|
- (BOOL)hasAcceptableStatusCode {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue