NetWorkingHTTP

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

-(void)buttonClick {

NSString *url = @"http://api.k780.com:88/?app=weather.future&weaid=1&&appkey=10003&sign=b59bc3ef6191eb9f747dd4e83c99f2a4&format=json";

//有网络才发送请求
if([BSYNetWorkingHTTP bsy_NetWorkIsNetWorking]){

    //发送请求,并且得到返回的数据

  NSString * str= [BSYNetWorkingHTTP bsy_getDataByURL:url];

    /**
     *  json字符串转字典
     */
    NSData *jsonData = [str dataUsingEncoding:NSUTF8StringEncoding];
    NSError *err;
    NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:jsonData
                                                        options:NSJSONReadingMutableContainers
                                                          error:&err];
    NSLog(@"   %@",dic);
}

} /**

    get获取图片 */