-
Notifications
You must be signed in to change notification settings - Fork 0
Before record response
Sergey edited this page Jul 28, 2018
·
2 revisions
This block can be provided during VCR configuration (instead of fixed filter map) in addition to configured filters to make final adjustments to request, before it will be recorded.
Block signature shown below:
^NSArray * (NSURLRequest *request, NSHTTPURLResponse *response, NSData *data);| Name | Type | Description |
|---|---|---|
request |
NSURLRequest |
Reference on request (after running beforeRecordRequest which should be stored onto cassette. |
response |
NSHTTPURLResponse |
Reference on response object which provide information about received data. |
data |
NSData |
Reference on actual server response binary data. |
Array where first element is same (or adjusted) response instance and second element is same (or adjusted) data instance. It is possible to remove service response from stub by returning array only with response.