Skip to content

POST body filter block

Sergey edited this page Jul 31, 2018 · 4 revisions

YHVPostBodyFilterBlock

This block can be provided during VCR configuration (instead of fixed filter map for JSON and multipart forms) to make it possible to remove sensitive data from POST body, before request will be recorded.

Block signature shown below:

^NSData * __nullable (NSURLRequest *request, NSData *body);

PARAMETERS

Name Type Description
request NSURLRequest Reference on request for which POST body filtering has been performed.
body NSData Reference on data which should be filtered.

RETURNS

Reference on value which should be used instead of original one or nil in case if POST body should be removed.