pod 'httpmodel', '~> 0.0.1'
NSString *url = @"http://www.kuaidi100.com/query?type=yuantong&postid=11111111111"; ZZHttpModel *model = [[ZZHttpModel alloc]initWithMethod:@"POST"]; [model pullData:url withParams:nil requestBlock:^(NSMutableURLRequest *request) { [request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"]; [request setValue:@"text/javascript" forHTTPHeaderField:@"Accept"]; } withCompletionBlock:^(ZZHTTPResponse *response) { NSLog(@"%@",response);
KuaidiModel *kuaidi = [[KuaidiModel alloc]initWithDictionary:response.data]; NSLog(@"%@",[kuaidi toDictionary]); }];