manager.responseSerializer.acceptableContentTypes = [NSSet setWithObject:@"text/html"];
这段代码是什么意思?
大家讲道理2017-04-18 09:57:46
manager's responseSerializer attribute. It only sets some fixed parsing formats. It does not include data formats such as text/html. The bottom layer of AFNetworking’s parsing format does not have data formats such as text/html:
manager.acceptableContentTypes = [NSSet setWithObjects:@"application/json", @"text/json", @"text/javascript", nil];
In order to avoid errors in network data parsing, add the text/html type to the receivable content types
manager.responseSerializer.acceptableContentTypes= [NSSetsetWithObjects:@"text/html", nil];