Browse files

Deprecate AFHTTPResponseSerializer.stringEncoding

The `stringEncoding` property is never used. It was probably inroduced by error in 9a40c0d. It was probably a copy/paste error as the same property also exists on `AFHTTPRequestSerializer` where it’s actually used.
1 parent 5b6def1 commit 33a403cb9c1ef52e5ee692ff4215bb5002fb07aa @0xced 0xced committed Oct 13, 2016
Showing with 1 addition and 6 deletions.
  1. +1 −4 AFNetworking/AFURLResponseSerialization.h
  2. +0 −2 AFNetworking/AFURLResponseSerialization.m
@@ -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.
@@ -97,8 +97,6 @@ - (instancetype)init {
return nil;
- self.stringEncoding = NSUTF8StringEncoding;
self.acceptableStatusCodes = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(200, 100)];
self.acceptableContentTypes = nil;

0 comments on commit 33a403c

Please sign in to comment.