-
Notifications
You must be signed in to change notification settings - Fork 71
Expand file tree
/
Copy pathGYHttpMock.h
More file actions
35 lines (26 loc) · 838 Bytes
/
GYHttpMock.h
File metadata and controls
35 lines (26 loc) · 838 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
//
// GYHttpMock.h
// GYNetwork
//
// Created by hypo on 16/1/13.
// Copyright © 2016年 hypoyao. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "GYMockRequest.h"
#import "GYHttpClientHook.h"
#import "GYMockResponse.h"
#import "GYMockRequestDSL.h"
#import "GYMockResponseDSL.h"
#import "NSString+mock.h"
@interface GYHttpMock : NSObject
@property (nonatomic, strong) NSMutableArray *stubbedRequests;
@property (nonatomic, strong) NSMutableArray *hooks;
@property (nonatomic, assign, getter = isStarted) BOOL started;
@property (nonatomic, copy) void (^logBlock)(NSString *logStr);
+ (GYHttpMock *)sharedInstance;
- (void)startMock;
- (void)stopMock;
- (GYMockResponse *)responseForRequest:(id<GYHTTPRequest>)request;
- (void)addMockRequest:(GYMockRequest *)request;
- (void)log:(NSString *)fmt, ...;
@end