************** #import "HMViewController.h" #import "MBProgressHUD+MJ.h" @interface HMViewController () @property (weak, nonatomic) IBOutlet UITextField *username; @property (weak, nonatomic) IBOutlet UITextField *pwd; - (IBAction)logi…
网络请求的步骤: get请求: #pragma mark - 这是私有方法,尽量不要再方法中直接使用属性,由于一般来说属性都是和界面关联的,我们能够通过參数的方式来使用属性 #pragma mark Get登录方法 - (void)loginWithGet:(NSString *)name pwd:(NSString *)pwd { //1确定地址NSURL NSString *urlString = [NSString stringWithFormat:@"www.baidu.com?user…
************POST请求 #import "HMViewController.h" #import "MBProgressHUD+MJ.h" @interface HMViewController () @property (weak, nonatomic) IBOutlet UITextField *username; @property (weak, nonatomic) IBOutlet UITextField *pwd; - (IBAction)…
****** - (void)viewDidLoad { [super viewDidLoad]; /** 加载服务器最新的视频信息 */ // 1.创建URL NSURL *url = HMUrl(@"video?type=XML"); // 2.创建请求 NSURLRequest *request = [NSURLRequest requestWithURL:url]; // 3.发送请求 [NSURLConnection sendAsynchronousRequest:reque…
********HMVideosViewController.m #import "HMVideosViewController.h" #import "MBProgressHUD+MJ.h" #import "HMVideo.h" #import "UIImageView+WebCache.h" #import <MediaPlayer/MediaPlayer.h> #define HMUrl(path) [NS…
***************** #import "HMViewController.h" #import "MBProgressHUD+MJ.h" @interface HMViewController () @property (weak, nonatomic) IBOutlet UITextField *username; @property (weak, nonatomic) IBOutlet UITextField *pwd; - (IBAction)l…
*********** #import "HMViewController.h" #import "MBProgressHUD+MJ.h" @interface HMViewController () @end @implementation HMViewController - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, ty…
*************** #import "HMViewController.h" #import "MBProgressHUD+MJ.h" @interface HMViewController () @end @implementation HMViewController - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view…
创建GET请求: // 1.设置请求路径 NSString *urlStr=[NSString stringWithFormat:@"http://192.168.1.53:8080/MJServer/login?username=%@&pwd=%@",self.username.text,self.pwd.text]; NSURL *url=[NSURL URLWithString:urlStr]; // 2.创建请求对象 NSURLRequest *request=[NSU…
博客: https://www.cnblogs.com/youxiu326/p/shiro-01.html github:https://github.com/youxiu326/sb_shiro_session.git 在原有基础上添加 SimpleFormAuthenticationFilter /** * 自定义过滤器,ajax请求数据 以json格式返回 * Created by lihui on 2019/2/28. */ public class SimpleFormAuthenti…