//GET
AFHTTPSessionManager*manager = [AFHTTPSessionManagermanager];
manager.responseSerializer.acceptableContentTypes= [NSSetsetWithObjects:@"text/html",nil];
[managerGET:@"000"parameters:nilprogress:nilsuccess:^(NSURLSessionTask*task,idresponseObject) {
NSLog(@"JSON: %@", responseObject);
}failure:^(NSURLSessionTask*operation,NSError*error) {
NSLog(@"Error: %@", error);
}];
//POST
AFHTTPSessionManager*session = [AFHTTPSessionManagermanager];
session.responseSerializer.acceptableContentTypes= [NSSetsetWithObjects:@"text/html",nil];
session.requestSerializer= [AFJSONRequestSerializerserializer];
NSMutableDictionary*params = [NSMutableDictionarydictionary];
params =@{@"username":@"33",@"password":@"33",@"client":@"ios"}.mutableCopy;
[sessionPOST:@"00"parameters:paramsprogress:nilsuccess:^(NSURLSessionDataTask*_Nonnulltask,id_NullableresponseObject) {
NSLog(@"%@",responseObject);
}failure:^(NSURLSessionDataTask*_Nullabletask,NSError*_Nonnullerror) {
NSLog(@"%@",error);
}];