Commit f0583aa9 authored by 汪洋's avatar 汪洋

升级GMNetService

parent e18cda35
......@@ -14,7 +14,7 @@ PODS:
- AFNetworking/Serialization (3.1.0)
- AFNetworking/UIKit (3.1.0):
- AFNetworking/NSURLSession
- GMBase (0.0.14):
- GMBase (0.0.15):
- GMNetService
- GMPhobos
- GMRefresh
......@@ -24,7 +24,7 @@ PODS:
- UITableView+FDTemplateLayoutCell (= 1.4)
- GMCache (0.1.0):
- TMCache (~> 2.1.0)
- GMNetService (0.1.3):
- GMNetService (0.1.4):
- AFNetworking (= 3.1.0)
- GMPhobos (0.2.18):
- GMCache (~> 0.1.0)
......@@ -46,9 +46,9 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67
GMBase: 92223d43d48ecac3991fe1bb5e8d0ee5bc23f1c6
GMBase: 17cb77aabaea020c2b59346b3c87c592a166e200
GMCache: a7b06a2d8a5a1c7cf023055c631ba9a0cd7c39fc
GMNetService: 2eb74ed62512078e9f00bc7006227a93c2acdf32
GMNetService: 4f900345322a1f0f3269fc7edb1cb04dd81a5511
GMPhobos: ea037939d26853e09774fd7e399f0b34fc6107aa
GMRefresh: 8d6ef25dbd38c2687fee713cc520012d47c7261e
JSONModel: 12523685c4b623553ccf844bbbf7007624317b2c
......
......@@ -24,6 +24,8 @@
* @since 0.2.3
*/
@property (nonatomic, strong) GMHTTPSessionManager *networking;
/*** @brief 稍安全HTTPS下载器*/
@property (nonatomic, strong) WMNetSecurityWorking *netSecurityworking;
/*** @brief 普通HTTP HOST*/
@property (nonatomic, strong) NSString *apiHost;
/*** @brief 安全HTTPS HOST*/
......
......@@ -23,8 +23,6 @@
return instance;
}
#pragma mark - Method Decrepeted
- (void)sendRequestWithURLString:(NSString *)URLString
parameters:(id)parameters
method:(HttpMethod)method
......@@ -34,6 +32,15 @@
}
- (void)sendSecurityRequestWithURLString:(NSString *)URLString
parameters:(id)parameters
method:(HttpMethod)method
success:(HttpSuccessBlock)success
failed:(HttpFailedBlock)failed{
[self sendRequestWithURLString:URLString parameters:parameters method:method success:success failed:failed isSecurity:YES];
}
- (void)sendUploadTaskRequestWithData:(NSData *)data
fileName:(NSString *)fileName
name:(NSString*)name
......@@ -45,6 +52,18 @@
[self sendUploadTaskRequestWithData:data fileName:fileName name:name url:url mineType:mineType parameters:parameters success:success failed:failed isSecurity:NO];
}
- (void)sendSecurityUploadTaskRequestWithData:(NSData *)data
fileName:(NSString *)fileName
name:(NSString*)name
url:(NSString*)url
mineType:(NSString *)mineType
parameters:(NSDictionary *)parameters
success:(HttpSuccessBlock)success
failed:(HttpFailedBlock)failed{
[self sendUploadTaskRequestWithData:data fileName:fileName name:name url:url mineType:mineType parameters:parameters success:success failed:failed isSecurity:YES];
}
#pragma mark - pravite method
- (void)sendRequestWithURLString:(NSString *)URLString
parameters:(id)parameters
......@@ -54,7 +73,12 @@
isSecurity:(BOOL)isSecurity{
NSString * resultURLString = [URLString stringByAppendingString:_urlCommonParameters];
//isSecurity为YES表示HTTTPS
if (isSecurity) {
[self startRequestWithNetworking: _netSecurityworking URLString:resultURLString parameters:parameters method:method success:success failed:failed];
}else{
[self startRequestWithNetworking: _networking URLString:resultURLString parameters:parameters method:method success:success failed:failed];
}
}
- (void)startRequestWithNetworking:(AFHTTPSessionManager*)networking
......@@ -193,4 +217,9 @@
_apiHost = apiHost;
_networking = [GMHTTPSessionManager shareInstanceWithApiHost:_apiHost];
}
- (void)setApiSecurityHost:(NSString *)apiSecurityHost{
_apiSecurityHost = apiSecurityHost;
_netSecurityworking = [GMHTTPSessionManager shareInstanceWithApiHost:_apiSecurityHost];
}
@end
{
"name": "GMBase",
"version": "0.0.14",
"version": "0.0.15",
"summary": "更美iOS APP 的 Objective-C 基础Pod库",
"homepage": "http://git.gengmei.cc/gengmeiios/GMBase",
"license": "仅限北京更美互动信息科技有限公司内部使用",
......@@ -9,7 +9,7 @@
},
"source": {
"git": "git@git.gengmei.cc:gengmeiios/GMBase.git",
"tag": "0.0.14"
"tag": "0.0.15"
},
"platforms": {
"ios": "8.0"
......
......@@ -14,7 +14,7 @@ PODS:
- AFNetworking/Serialization (3.1.0)
- AFNetworking/UIKit (3.1.0):
- AFNetworking/NSURLSession
- GMBase (0.0.14):
- GMBase (0.0.15):
- GMNetService
- GMPhobos
- GMRefresh
......@@ -24,7 +24,7 @@ PODS:
- UITableView+FDTemplateLayoutCell (= 1.4)
- GMCache (0.1.0):
- TMCache (~> 2.1.0)
- GMNetService (0.1.3):
- GMNetService (0.1.4):
- AFNetworking (= 3.1.0)
- GMPhobos (0.2.18):
- GMCache (~> 0.1.0)
......@@ -46,9 +46,9 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67
GMBase: 92223d43d48ecac3991fe1bb5e8d0ee5bc23f1c6
GMBase: 17cb77aabaea020c2b59346b3c87c592a166e200
GMCache: a7b06a2d8a5a1c7cf023055c631ba9a0cd7c39fc
GMNetService: 2eb74ed62512078e9f00bc7006227a93c2acdf32
GMNetService: 4f900345322a1f0f3269fc7edb1cb04dd81a5511
GMPhobos: ea037939d26853e09774fd7e399f0b34fc6107aa
GMRefresh: 8d6ef25dbd38c2687fee713cc520012d47c7261e
JSONModel: 12523685c4b623553ccf844bbbf7007624317b2c
......
......@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>0.0.14</string>
<string>0.0.15</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
......
......@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>0.1.3</string>
<string>0.1.4</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
......
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