|
@@ -111,14 +111,14 @@ static NSString * AFPercentEscapedStringFromString(NSString *string) {
|
|
|
@property (readwrite, nonatomic, strong) id field;
|
|
|
@property (readwrite, nonatomic, strong) id value;
|
|
|
|
|
|
-- (id)initWithField:(id)field value:(id)value;
|
|
|
+- (instancetype)initWithField:(id)field value:(id)value;
|
|
|
|
|
|
- (NSString *)URLEncodedStringValue;
|
|
|
@end
|
|
|
|
|
|
@implementation AFQueryStringPair
|
|
|
|
|
|
-- (id)initWithField:(id)field value:(id)value {
|
|
|
+- (instancetype)initWithField:(id)field value:(id)value {
|
|
|
self = [super init];
|
|
|
if (!self) {
|
|
|
return nil;
|
|
@@ -591,7 +591,7 @@ forHTTPHeaderField:(NSString *)field
|
|
|
return YES;
|
|
|
}
|
|
|
|
|
|
-- (id)initWithCoder:(NSCoder *)decoder {
|
|
|
+- (instancetype)initWithCoder:(NSCoder *)decoder {
|
|
|
self = [self init];
|
|
|
if (!self) {
|
|
|
return nil;
|
|
@@ -610,7 +610,7 @@ forHTTPHeaderField:(NSString *)field
|
|
|
|
|
|
#pragma mark - NSCopying
|
|
|
|
|
|
-- (id)copyWithZone:(NSZone *)zone {
|
|
|
+- (instancetype)copyWithZone:(NSZone *)zone {
|
|
|
AFHTTPRequestSerializer *serializer = [[[self class] allocWithZone:zone] init];
|
|
|
serializer.mutableHTTPRequestHeaders = [self.mutableHTTPRequestHeaders mutableCopyWithZone:zone];
|
|
|
serializer.queryStringSerializationStyle = self.queryStringSerializationStyle;
|
|
@@ -684,7 +684,7 @@ NSTimeInterval const kAFUploadStream3GSuggestedDelay = 0.2;
|
|
|
@property (readonly, nonatomic, assign) unsigned long long contentLength;
|
|
|
@property (readonly, nonatomic, assign, getter = isEmpty) BOOL empty;
|
|
|
|
|
|
-- (id)initWithStringEncoding:(NSStringEncoding)encoding;
|
|
|
+- (instancetype)initWithStringEncoding:(NSStringEncoding)encoding;
|
|
|
- (void)setInitialAndFinalBoundaries;
|
|
|
- (void)appendHTTPBodyPart:(AFHTTPBodyPart *)bodyPart;
|
|
|
@end
|
|
@@ -700,8 +700,8 @@ NSTimeInterval const kAFUploadStream3GSuggestedDelay = 0.2;
|
|
|
|
|
|
@implementation AFStreamingMultipartFormData
|
|
|
|
|
|
-- (id)initWithURLRequest:(NSMutableURLRequest *)urlRequest
|
|
|
- stringEncoding:(NSStringEncoding)encoding
|
|
|
+- (instancetype)initWithURLRequest:(NSMutableURLRequest *)urlRequest
|
|
|
+ stringEncoding:(NSStringEncoding)encoding
|
|
|
{
|
|
|
self = [super init];
|
|
|
if (!self) {
|
|
@@ -893,7 +893,7 @@ NSTimeInterval const kAFUploadStream3GSuggestedDelay = 0.2;
|
|
|
@synthesize streamError;
|
|
|
#pragma clang diagnostic pop
|
|
|
|
|
|
-- (id)initWithStringEncoding:(NSStringEncoding)encoding {
|
|
|
+- (instancetype)initWithStringEncoding:(NSStringEncoding)encoding {
|
|
|
self = [super init];
|
|
|
if (!self) {
|
|
|
return nil;
|
|
@@ -1036,7 +1036,7 @@ NSTimeInterval const kAFUploadStream3GSuggestedDelay = 0.2;
|
|
|
|
|
|
#pragma mark - NSCopying
|
|
|
|
|
|
--(id)copyWithZone:(NSZone *)zone {
|
|
|
+- (instancetype)copyWithZone:(NSZone *)zone {
|
|
|
AFMultipartBodyStream *bodyStreamCopy = [[[self class] allocWithZone:zone] initWithStringEncoding:self.stringEncoding];
|
|
|
|
|
|
for (AFHTTPBodyPart *bodyPart in self.HTTPBodyParts) {
|
|
@@ -1073,7 +1073,7 @@ typedef enum {
|
|
|
|
|
|
@implementation AFHTTPBodyPart
|
|
|
|
|
|
-- (id)init {
|
|
|
+- (instancetype)init {
|
|
|
self = [super init];
|
|
|
if (!self) {
|
|
|
return nil;
|
|
@@ -1251,7 +1251,7 @@ typedef enum {
|
|
|
|
|
|
#pragma mark - NSCopying
|
|
|
|
|
|
-- (id)copyWithZone:(NSZone *)zone {
|
|
|
+- (instancetype)copyWithZone:(NSZone *)zone {
|
|
|
AFHTTPBodyPart *bodyPart = [[[self class] allocWithZone:zone] init];
|
|
|
|
|
|
bodyPart.stringEncoding = self.stringEncoding;
|
|
@@ -1314,7 +1314,7 @@ typedef enum {
|
|
|
|
|
|
#pragma mark - NSSecureCoding
|
|
|
|
|
|
-- (id)initWithCoder:(NSCoder *)decoder {
|
|
|
+- (instancetype)initWithCoder:(NSCoder *)decoder {
|
|
|
self = [super initWithCoder:decoder];
|
|
|
if (!self) {
|
|
|
return nil;
|
|
@@ -1333,7 +1333,7 @@ typedef enum {
|
|
|
|
|
|
#pragma mark - NSCopying
|
|
|
|
|
|
-- (id)copyWithZone:(NSZone *)zone {
|
|
|
+- (instancetype)copyWithZone:(NSZone *)zone {
|
|
|
AFJSONRequestSerializer *serializer = [super copyWithZone:zone];
|
|
|
serializer.writingOptions = self.writingOptions;
|
|
|
|
|
@@ -1393,7 +1393,7 @@ typedef enum {
|
|
|
|
|
|
#pragma mark - NSSecureCoding
|
|
|
|
|
|
-- (id)initWithCoder:(NSCoder *)decoder {
|
|
|
+- (instancetype)initWithCoder:(NSCoder *)decoder {
|
|
|
self = [super initWithCoder:decoder];
|
|
|
if (!self) {
|
|
|
return nil;
|
|
@@ -1414,7 +1414,7 @@ typedef enum {
|
|
|
|
|
|
#pragma mark - NSCopying
|
|
|
|
|
|
-- (id)copyWithZone:(NSZone *)zone {
|
|
|
+- (instancetype)copyWithZone:(NSZone *)zone {
|
|
|
AFPropertyListRequestSerializer *serializer = [super copyWithZone:zone];
|
|
|
serializer.format = self.format;
|
|
|
serializer.writeOptions = self.writeOptions;
|