Commit 53d41ce0 authored by 乔金柱's avatar 乔金柱

增加httpmethod 可选

parent b8676879
...@@ -14,7 +14,7 @@ PODS: ...@@ -14,7 +14,7 @@ PODS:
- AFNetworking/Serialization (3.1.0) - AFNetworking/Serialization (3.1.0)
- AFNetworking/UIKit (3.1.0): - AFNetworking/UIKit (3.1.0):
- AFNetworking/NSURLSession - AFNetworking/NSURLSession
- GMBase (0.2.0): - GMBase (0.2.1):
- GMHud - GMHud
- GMKit - GMKit
- GMNetService - GMNetService
...@@ -88,7 +88,7 @@ EXTERNAL SOURCES: ...@@ -88,7 +88,7 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS: SPEC CHECKSUMS:
AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67 AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67
GMBase: 9d827019fb8ea34d2c1d8c3e345f42088d117781 GMBase: f95d65a135a42f5da0a6cd997eb82347166d7ec6
GMCache: fb0af70b420715ef9519487fdd932a357b3cd8d4 GMCache: fb0af70b420715ef9519487fdd932a357b3cd8d4
GMHud: 74387462a8b9f099c760a1ddbf493cc86da7cdbc GMHud: 74387462a8b9f099c760a1ddbf493cc86da7cdbc
GMKit: 4820e0eb7727735f88fb2f983f178edd074343c1 GMKit: 4820e0eb7727735f88fb2f983f178edd074343c1
......
...@@ -81,6 +81,8 @@ ...@@ -81,6 +81,8 @@
*/ */
NSString *_deduplicationKey; NSString *_deduplicationKey;
} }
@property (nonatomic,assign) HttpMethod httpMethod;
@property (nonatomic, copy) NSArray *notDeduplicate; @property (nonatomic, copy) NSArray *notDeduplicate;
// 去重时被去掉的数据总计。在上拉加载更多时,这个数目仍要被用上,否则在某种极端的情况下,startNum会与服务器对不上,导致出现没有数据返回 // 去重时被去掉的数据总计。在上拉加载更多时,这个数目仍要被用上,否则在某种极端的情况下,startNum会与服务器对不上,导致出现没有数据返回
@property (nonatomic,assign) NSInteger deleteCount; @property (nonatomic,assign) NSInteger deleteCount;
......
...@@ -24,6 +24,8 @@ ...@@ -24,6 +24,8 @@
_fetchDataErrorMsg = @"获取数据失败,请重试"; _fetchDataErrorMsg = @"获取数据失败,请重试";
_fetchDataNilMsg = @"暂时没有相关数据"; _fetchDataNilMsg = @"暂时没有相关数据";
_message = @""; _message = @"";
//方便 某个接口做其他请求方式 上传需求
_httpMethod = HttpMethodGet;
} }
return self; return self;
} }
...@@ -47,8 +49,13 @@ ...@@ -47,8 +49,13 @@
return; return;
} }
if (_httpMethod == nil) {
//防止某种情况下为空 加一个默认值
_httpMethod = HttpMethodGet;
}
[self buildParams]; [self buildParams];
[[WMNetService sharedInstance] sendRequestWithURLString:_remoteUrl parameters:_params method:HttpMethodGet success:^(id responseObject) { [[WMNetService sharedInstance] sendRequestWithURLString:_remoteUrl parameters:_params method:_httpMethod success:^(id responseObject) {
if ([self shouldClearDataForResponse:responseObject]) { if ([self shouldClearDataForResponse:responseObject]) {
[self clearData]; [self clearData];
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment