Skip to content

Commit

Permalink
Deprecate AFHTTPResponseSerializer.stringEncoding
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
0xced committed Oct 13, 2016
1 parent 5b6def1 commit 33a403c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 1 addition & 4 deletions AFNetworking/AFURLResponseSerialization.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 0 additions & 2 deletions AFNetworking/AFURLResponseSerialization.m
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@ - (instancetype)init {
return nil;
}

self.stringEncoding = NSUTF8StringEncoding;

self.acceptableStatusCodes = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(200, 100)];
self.acceptableContentTypes = nil;

Expand Down

0 comments on commit 33a403c

Please sign in to comment.