-(id)executeByOperationManager
{
AFHTTPRequestOperationManager *manager = [self afnetworkOperationManager];
AFJSONRequestSerializer *requestSerializer = [AFJSONRequestSerializer serializer];
[requestSerializer setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
[requestSerializer setValue:@"application/json" forHTTPHeaderField:@"Accept"];
manager.requestSerializer = requestSerializer;
manager.securityPolicy.allowInvalidCertificates=YES;
manager.responseSerializer.acceptableContentTypes =
[NSSet setWithObjects:@"text/html",@"text/json", nil];
AFHTTPRequestOperation *operation = [manager POST:(NSString *)[self getUrl]
parameters:[self getBodyParam]
success:^(AFHTTPRequestOperation *operation, id responseObject){
[self onRequestSuccess:responseObject];
[self invokeComplete];
}
failure:^(AFHTTPRequestOperation *operation, NSError *error){
if (operation.responseObject) {
[self onRequestSuccess:operation.responseObject];
}else{
[self onRequestFailed:error];
}
[self invokeComplete];
}];
[operation start];
return operation;
}