Browse Source

Merge pull request #3751 from 0xced/deprecate-stringEncoding

Deprecate the unused stringEncoding property of AFHTTPResponseSerializer
Cédric Luthi 8 years ago
parent
commit
4f3c694920

+ 1 - 4
AFNetworking/AFURLResponseSerialization.h

@@ -57,10 +57,7 @@ NS_ASSUME_NONNULL_BEGIN
 
 - (instancetype)init;
 
-/**
- The string encoding used to serialize data received from the server, when no string encoding is specified by the response. `NSUTF8StringEncoding` by default.
- */
-@property (nonatomic, assign) NSStringEncoding stringEncoding;
+@property (nonatomic, assign) NSStringEncoding stringEncoding DEPRECATED_MSG_ATTRIBUTE("The string encoding is never used. AFHTTPResponseSerializer only validates status codes and content types but does not try to decode the received data in any way.");
 
 /**
  Creates and returns a serializer with default configuration.

+ 0 - 2
AFNetworking/AFURLResponseSerialization.m

@@ -97,8 +97,6 @@ static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingO
         return nil;
     }
 
-    self.stringEncoding = NSUTF8StringEncoding;
-
     self.acceptableStatusCodes = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(200, 100)];
     self.acceptableContentTypes = nil;