GYHttpMock
GYHttpMock copied to clipboard
当请求返回的是一个 Array 时,Crash。
比如:http://jsonplaceholder.typicode.com/users GET 请求返回的是一个 Array,
而 GYMockURLProtocol
内部通过 NSURLConnection sendAsynchronousRequest:
请求得到的返回数据是通过 NSMutableDictionary *result = [NSMutableDictionary dictionaryWithDictionary:json];
进行解析的,
此时 json
是个 Array,导致了 crash。