Merge pull request #3037 from dreampiggy/bugfix_request_modifier_nil
Fix the issue that the NSURLRequest method should not be nil, which may cause Crash
This commit is contained in:
commit
f8fa41218d
|
@ -53,7 +53,7 @@
|
|||
}
|
||||
|
||||
- (instancetype)initWithMethod:(NSString *)method headers:(NSDictionary<NSString *,NSString *> *)headers body:(NSData *)body {
|
||||
method = [method copy];
|
||||
method = method ? [method copy] : @"GET";
|
||||
headers = [headers copy];
|
||||
body = [body copy];
|
||||
return [self initWithBlock:^NSURLRequest * _Nullable(NSURLRequest * _Nonnull request) {
|
||||
|
|
Loading…
Reference in New Issue