NSURL *url=[NSURL URLWithString:urlString];
NSMutableURLRequest *requests = [[NSMutableURLRequest alloc]initWithURL:url cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:50];
[requests setHTTPMethod:@"POST"];
NSString *postParams = [NSString stringWithFormat:@"{\"token\":\"json\",\"account\":\"%@\",\"password\":\"%@\"}",username,password];
//NSDictionary *jsonDic=[NSDictionary dictionaryWithObjectsAndKeys:@"ios_json_data",@"token",@"testid",@"account",@"testid",@"password", nil];
//NSString *jsonStr=[NSString jsonStringWithDictionary:jsonDic];
NSData *data =[postParams dataUsingEncoding:NSUTF8StringEncoding];
[requests setValue:[NSString stringWithFormat:@"%lu",(unsigned long)data.length] forHTTPHeaderField:@"Content-Length"];
[requests setValue:@"application/json"forHTTPHeaderField:@"Content-Type"];
[requests setHTTPBody:data];
AFJSONRequestOperation *operation = [AFJSONRequestOperation JSONRequestOperationWithRequest:requests success:^(NSURLRequest *request, NSHTTPURLResponse *response, id JSON) {
NSLog(@"Success \n======url===%@ \n====request.httpBody====%@ \n===response===%@ \n===json===%@",requests.URL,[[NSString alloc] initWithData:requests.HTTPBody encoding:NSUTF8StringEncoding],response,JSON);
} failure:^(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id JSON) {
NSLog(@"falure============%@ %@ %@ %@",requests,response,error,JSON);
}];
[operation start];