Skip to content

Commit cc4befd

Browse files
committed
requestJsonDataWithPath - 健壮性
1 parent ebd7127 commit cc4befd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Coding_iOS/Util/Manager/CodingNetAPIClient.m

+3
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ - (void)requestJsonDataWithPath:(NSString *)aPath
4343
withParams:(NSDictionary*)params
4444
withMethodType:(int)NetworkMethod
4545
andBlock:(void (^)(id data, NSError *error))block{
46+
if (!aPath || aPath.length <= 0) {
47+
return;
48+
}
4649
//log请求数据
4750
DebugLog(@"\n===========request===========\n%@:\n%@", aPath, params);
4851
aPath = [aPath stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];

0 commit comments

Comments
 (0)