-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLSBaseRequest.h
More file actions
42 lines (30 loc) · 897 Bytes
/
LSBaseRequest.h
File metadata and controls
42 lines (30 loc) · 897 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//
// LSBaseRequest.h
// LSNetworkManager
//
// Created by StephenChen on 15/9/21.
// Copyright (c) 2015年 Lansion. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "LSNetworkManager.h"
enum Method {
GET,
POST,
POST_FILE,
};
@protocol LSNetworkResponser <NSObject>
-(void) success:(id) responseObject withTag:(int)tag;
-(void) failure:(NSError*) error withTag:(int)tag;
@end
@interface LSBaseRequest : NSObject
@property (nonatomic,strong) id<LSNetworkResponser> responser;
@property enum Method method;
@property(nonatomic) int tag;
@property(nonatomic, copy) NSString *baseUrl;
@property(nonatomic,copy) NSString *path;
@property(nonatomic,copy) NSMutableDictionary *params;
@property(nonatomic,copy) NSString *filePath;
@property(nonatomic,copy) NSString *fileType;
-(instancetype)init:(NSString*)path method:(enum Method) method;
-(void) go;
@end