AFNetWorking上传JSON串
AFHTTPSessionManager *manager = [AFHTTPSessionManager manager]; manager.responseSerializer = [AFJSONResponseSerializer serializer]; manager.requestSerializer=[AFJSONRequestSerializer serializer]; [manager POST:urlStr parameters:parma progress:^(NSProgress * _Nonnull uploadProgress) { } success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) { block(responseObject,nil); } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) { [self showAlertView:[error description]]; [self hideHud]; block(nil,error); }];