Permalink
Browse files

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

Deprecate the unused stringEncoding property of AFHTTPResponseSerializer
2 parents 5b6def1 + 33a403c commit 4f3c694920ed0f5d3a8e180aacaf3af40c2efb4a @0xced 0xced committed on GitHub Oct 14, 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 4f3c694

Please sign in to comment.