File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change 11Pod ::Spec . new do |s |
22
33 s . name = "OHHTTPStubs"
4- s . version = "2.3.0 "
4+ s . version = "2.3.1 "
55
66 s . summary = "Stubbing framework for network requests."
77 s . description = <<-DESC
Original file line number Diff line number Diff line change @@ -18,16 +18,14 @@ + (instancetype)responseWithJSONObject:(id)jsonObject
1818{
1919 if (!httpHeaders[@" Content-Type" ])
2020 {
21- // If httpHeaders is nil, we can't make a mutable copy.
22- NSMutableDictionary *mutableHeaders = httpHeaders ? [httpHeaders mutableCopy ] : [NSMutableDictionary dictionary ];
21+ NSMutableDictionary * mutableHeaders = [NSMutableDictionary dictionaryWithDictionary: httpHeaders];
2322 mutableHeaders[@" Content-Type" ] = @" application/json" ;
24- httpHeaders = [mutableHeaders copy ]; // make immutable again
23+ httpHeaders = [NSDictionary dictionaryWithDictionary: mutableHeaders ]; // make immutable again
2524 }
2625
2726 return [self responseWithData: [NSJSONSerialization dataWithJSONObject: jsonObject options: 0 error: nil ]
2827 statusCode: statusCode
29- headers: httpHeaders
30- ];
28+ headers: httpHeaders];
3129}
3230
3331@end
You can’t perform that action at this time.
0 commit comments