Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

yellowzhou/ZZHttpModel

Repository files navigation

ZZHttmModel

安装使用

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]); }];

返回response对象

github

Dictionary => Model

github

Model => Dictionary

github

Model => JSON

github github

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

Contributors

AltStyle によって変換されたページ (->オリジナル) /