Skip to content

没有办法拦截AFNetWorking的请求 需要额外的做操作吗 #20

Description

@lutingnit1

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) {
    //数据请求的进度
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions