GYHttpMock
GYHttpMock copied to clipboard
没有办法拦截AFNetWorking的请求 需要额外的做操作吗
manager.responseSerializer.acceptableContentTypes = [NSSet setWithObjects:@"application/json",@"text/json",@"text/javascript",@"text/html", nil]; //get请求 // SKIODriver * mockDriver=[[SKIODriver alloc]init]; // [mockDriver testUrl:urlString]; mockRequest(@"GET", @"https://www.baidu.com") .withBody(@"ceshi") .andReturn(200).withBody(@"{"key":"value"}");
[manager GET:urlString parameters:nil progress:^(NSProgress * _Nonnull downloadProgress) {
//数据请求的进度
}